nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 libconfuse,
4 stdenv,
5 fetchFromGitHub,
6 cmake,
7 help2man,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "postsrsd";
12 version = "2.0.11";
13
14 src = fetchFromGitHub {
15 owner = "roehling";
16 repo = "postsrsd";
17 rev = version;
18 sha256 = "sha256-Q7tXCd2Mz3WIGnIrbb8mfgT7fcmtVS4EtF0ztYmEsmM=";
19 };
20
21 cmakeFlags = [
22 "-DGENERATE_SRS_SECRET=OFF"
23 "-DINIT_FLAVOR=systemd"
24 "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
25 "-DINSTALL_SYSTEMD_SERVICE=OFF"
26 ];
27
28 preConfigure = ''
29 sed -i "s,\"/etc\",\"$out/etc\",g" CMakeLists.txt
30 '';
31
32 nativeBuildInputs = [
33 cmake
34 help2man
35 ];
36
37 buildInputs = [
38 libconfuse
39 ];
40
41 meta = with lib; {
42 homepage = "https://github.com/roehling/postsrsd";
43 description = "Postfix Sender Rewriting Scheme daemon";
44 mainProgram = "postsrsd";
45 license = licenses.gpl2Plus;
46 platforms = platforms.all;
47 maintainers = with maintainers; [ abbradar ];
48 };
49}