mail2-nixos-config/pkg-postfixadmin.nix

36 lines
883 B
Nix
Raw Normal View History

2019-05-10 23:21:28 +02:00
{ stdenv, lib, fetchFromGitHub, config ? null, cacheDir ? null }:
stdenv.mkDerivation rec {
name = "postfixadmin-${version}";
2020-04-18 15:13:08 +02:00
version = "3.2.4";
2019-05-10 23:21:28 +02:00
rev = "${name}";
src = fetchFromGitHub {
inherit rev;
owner = "postfixadmin";
repo = "postfixadmin";
2020-04-18 15:13:08 +02:00
sha256 = "177rgljwq08l0z3d5fcg0x7v326di79xi9611j355zrjir78fy0j";
2019-05-10 23:21:28 +02:00
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
cp -Rp ./ $out/
${lib.optionalString (config != null) ''
ln -s ${config} $out/config.local.php
''}
${lib.optionalString (cacheDir != null) ''
ln -s ${cacheDir}/templates_c $out/templates_c
''}
'';
meta = with stdenv.lib; {
description = "Postfix Admin";
homepage = http://postfixadmin.sourceforge.net/;
license = licenses.gpl2;
maintainers = with maintainers; [ tokudan ];
platforms = platforms.all;
};
}