571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, writeText
|
|
, dataPath ? "/var/lib/snappymail"
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "snappymail";
|
|
version = "2.38.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/the-djmaze/snappymail/releases/download/v${version}/snappymail-${version}.tar.gz";
|
|
sha256 = "sha256-43mmsnK+eBFu+z5DKUxu5NBiS3ktn7uzetg+BHWxSTI=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|