diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/snappymail')
-rw-r--r-- | nixpkgs/pkgs/servers/snappymail/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/snappymail/default.nix b/nixpkgs/pkgs/servers/snappymail/default.nix new file mode 100644 index 000000000000..0604c8c50b3c --- /dev/null +++ b/nixpkgs/pkgs/servers/snappymail/default.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchurl +, writeText +, dataPath ? "/var/lib/snappymail" +}: + +stdenv.mkDerivation rec { + pname = "snappymail"; + version = "2.35.4"; + + src = fetchurl { + url = "https://github.com/the-djmaze/snappymail/releases/download/v${version}/snappymail-${version}.tar.gz"; + sha256 = "sha256-l75s2ntZM/eqoFqw8bMkmxwPBvOFwf2Y8TpSsyzu3cU="; + }; + + 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"; + changelog = "https://github.com/the-djmaze/snappymail/blob/v${version}/CHANGELOG.md"; + downloadPage = "https://github.com/the-djmaze/snappymail/releases"; + license = licenses.agpl3Only; + platforms = platforms.all; + maintainers = with maintainers; [ mic92 ]; + }; +} |