2022-12-11 09:46:54 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, writeText
|
|
|
|
, dataPath ? "/var/lib/snappymail"
|
|
|
|
}:
|
|
|
|
|
2022-07-15 19:33:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "snappymail";
|
2023-01-19 04:27:15 +00:00
|
|
|
version = "2.24.5";
|
2022-07-15 19:33:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/the-djmaze/snappymail/releases/download/v${version}/snappymail-${version}.tar.gz";
|
2023-01-19 04:27:15 +00:00
|
|
|
sha256 = "sha256-LqipclpQe2eDWNgapdEpgqzAh1jz4uyJHEQem0Z9g4w=";
|
2022-07-15 19:33:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "snappymail";
|
|
|
|
|
|
|
|
includeScript = writeText "include.php" ''
|
|
|
|
<?php
|
|
|
|
|
|
|
|
# the trailing `/` is important here
|
|
|
|
define('APP_DATA_FOLDER_PATH', '${dataPath}/');
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r ../* $out
|
|
|
|
rm -rf $out/{data,env-vars,_include.php}
|
|
|
|
cp ${includeScript} $out/include.php
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple, modern & fast web-based email client";
|
|
|
|
homepage = "https://snappymail.eu";
|
2022-12-11 09:46:54 +00:00
|
|
|
changelog = "https://github.com/the-djmaze/snappymail/blob/v${version}/CHANGELOG.md";
|
2022-07-15 19:33:33 +00:00
|
|
|
downloadPage = "https://github.com/the-djmaze/snappymail/releases";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
};
|
|
|
|
}
|