mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, writeText
|
|
, dataPath ? "/var/lib/snappymail"
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "snappymail";
|
|
version = "2.37.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/the-djmaze/snappymail/releases/download/v${version}/snappymail-${version}.tar.gz";
|
|
sha256 = "sha256-Fa6VbWPROkdVS8wHkXYCNR+DiBR6SqvfmrjGVlhhkwU=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|