diff options
Diffstat (limited to 'flakes/opendmarc')
-rw-r--r-- | flakes/opendmarc/default.nix | 25 | ||||
-rw-r--r-- | flakes/opendmarc/flake.lock | 53 | ||||
-rw-r--r-- | flakes/opendmarc/flake.nix | 39 |
3 files changed, 49 insertions, 68 deletions
diff --git a/flakes/opendmarc/default.nix b/flakes/opendmarc/default.nix new file mode 100644 index 0000000..53c1fe2 --- /dev/null +++ b/flakes/opendmarc/default.nix | |||
@@ -0,0 +1,25 @@ | |||
1 | { stdenv, lib, libspf2, libbsd, openssl, libmilter, perl, libnsl, fetchurl }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | pname = "opendmarc"; | ||
4 | version = "1.3.2"; | ||
5 | |||
6 | src = fetchurl { | ||
7 | url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz"; | ||
8 | sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11"; | ||
9 | }; | ||
10 | |||
11 | configureFlags= [ | ||
12 | "--with-spf" | ||
13 | "--with-spf2-include=${libspf2}/include/spf2" | ||
14 | "--with-spf2-lib=${libspf2}/lib/" | ||
15 | "--with-milter=${libmilter}" | ||
16 | ]; | ||
17 | |||
18 | buildInputs = [ libspf2 libbsd openssl libmilter perl libnsl ]; | ||
19 | |||
20 | meta = { | ||
21 | description = "Free open source software implementation of the DMARC specification"; | ||
22 | homepage = "http://www.trusteddomain.org/opendmarc/"; | ||
23 | platforms = lib.platforms.unix; | ||
24 | }; | ||
25 | } | ||
diff --git a/flakes/opendmarc/flake.lock b/flakes/opendmarc/flake.lock index 9e6a869..0bd645c 100644 --- a/flakes/opendmarc/flake.lock +++ b/flakes/opendmarc/flake.lock | |||
@@ -33,39 +33,29 @@ | |||
33 | "libspf2": { | 33 | "libspf2": { |
34 | "inputs": { | 34 | "inputs": { |
35 | "flake-utils": "flake-utils_2", | 35 | "flake-utils": "flake-utils_2", |
36 | "nixpkgs": "nixpkgs" | 36 | "nixpkgs": [ |
37 | "nixpkgs" | ||
38 | ] | ||
37 | }, | 39 | }, |
38 | "locked": { | 40 | "locked": { |
39 | "dir": "flakes/libspf2", | 41 | "narHash": "sha256-q6JJxHV1hyMQlqsqFFTFeUyiH6HsVZJ3GYxXODybPfM=", |
40 | "lastModified": 1609548509, | 42 | "path": "../libspf2", |
41 | "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=", | 43 | "type": "path" |
42 | "ref": "master", | ||
43 | "rev": "749623765bef80615fc21e73aff89521d262e277", | ||
44 | "revCount": 796, | ||
45 | "type": "git", | ||
46 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
47 | }, | 44 | }, |
48 | "original": { | 45 | "original": { |
49 | "dir": "flakes/libspf2", | 46 | "path": "../libspf2", |
50 | "type": "git", | 47 | "type": "path" |
51 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
52 | } | 48 | } |
53 | }, | 49 | }, |
54 | "myuids": { | 50 | "myuids": { |
55 | "locked": { | 51 | "locked": { |
56 | "dir": "flakes/myuids", | 52 | "narHash": "sha256-GUYJUFgSpffirdUSwZ1r/NyAQkBkVxgH6fEaOvtyGiI=", |
57 | "lastModified": 1609548509, | 53 | "path": "../myuids", |
58 | "narHash": "sha256-d9gssVdKV0EaeDU/L5QgQpQwFuxWMbwNQ71i7z4LdDs=", | 54 | "type": "path" |
59 | "ref": "master", | ||
60 | "rev": "749623765bef80615fc21e73aff89521d262e277", | ||
61 | "revCount": 796, | ||
62 | "type": "git", | ||
63 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
64 | }, | 55 | }, |
65 | "original": { | 56 | "original": { |
66 | "dir": "flakes/myuids", | 57 | "path": "../myuids", |
67 | "type": "git", | 58 | "type": "path" |
68 | "url": "https://git.immae.eu/perso/Immae/Config/Nix.git" | ||
69 | } | 59 | } |
70 | }, | 60 | }, |
71 | "nixpkgs": { | 61 | "nixpkgs": { |
@@ -83,27 +73,12 @@ | |||
83 | "type": "github" | 73 | "type": "github" |
84 | } | 74 | } |
85 | }, | 75 | }, |
86 | "nixpkgs_2": { | ||
87 | "locked": { | ||
88 | "lastModified": 1597943282, | ||
89 | "narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=", | ||
90 | "owner": "NixOS", | ||
91 | "repo": "nixpkgs", | ||
92 | "rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38", | ||
93 | "type": "github" | ||
94 | }, | ||
95 | "original": { | ||
96 | "owner": "NixOS", | ||
97 | "repo": "nixpkgs", | ||
98 | "type": "github" | ||
99 | } | ||
100 | }, | ||
101 | "root": { | 76 | "root": { |
102 | "inputs": { | 77 | "inputs": { |
103 | "flake-utils": "flake-utils", | 78 | "flake-utils": "flake-utils", |
104 | "libspf2": "libspf2", | 79 | "libspf2": "libspf2", |
105 | "myuids": "myuids", | 80 | "myuids": "myuids", |
106 | "nixpkgs": "nixpkgs_2" | 81 | "nixpkgs": "nixpkgs" |
107 | } | 82 | } |
108 | } | 83 | } |
109 | }, | 84 | }, |
diff --git a/flakes/opendmarc/flake.nix b/flakes/opendmarc/flake.nix index e80376f..bf7bd5b 100644 --- a/flakes/opendmarc/flake.nix +++ b/flakes/opendmarc/flake.nix | |||
@@ -10,41 +10,16 @@ | |||
10 | url = "https://git.immae.eu/perso/Immae/Config/Nix.git"; | 10 | url = "https://git.immae.eu/perso/Immae/Config/Nix.git"; |
11 | type = "git"; | 11 | type = "git"; |
12 | dir = "flakes/libspf2"; | 12 | dir = "flakes/libspf2"; |
13 | inputs.nixpkgs.follows = "nixpkgs"; | ||
13 | }; | 14 | }; |
14 | inputs.flake-utils.url = "github:numtide/flake-utils"; | 15 | inputs.flake-utils.url = "github:numtide/flake-utils"; |
15 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | 16 | inputs.nixpkgs.url = "github:NixOS/nixpkgs"; |
16 | 17 | ||
17 | outputs = { self, myuids, libspf2, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: | 18 | outputs = { self, myuids, libspf2, flake-utils, nixpkgs }: flake-utils.lib.eachSystem ["aarch64-linux" "i686-linux" "x86_64-linux"] (system: |
18 | let | 19 | let |
19 | libspf2' = libspf2.defaultPackage."${system}"; | 20 | pkgs = import nixpkgs { inherit system; overlays = [ libspf2.overlay ]; }; |
20 | pkgs = import nixpkgs { inherit system; overlays = []; }; | ||
21 | inherit (pkgs) fetchurl stdenv libbsd perl openssl libmilter file libnsl; | ||
22 | in rec { | 21 | in rec { |
23 | packages.opendmarc = stdenv.mkDerivation rec { | 22 | packages.opendmarc = pkgs.callPackage ./. {}; |
24 | pname = "opendmarc"; | ||
25 | version = "1.3.2"; | ||
26 | |||
27 | src = fetchurl { | ||
28 | url = "mirror://sourceforge/opendmarc/files/${pname}-${version}.tar.gz"; | ||
29 | sha256 = "1yrggj8yq0915y2i34gfz2xpl1w2lgb1vggp67rwspgzm40lng11"; | ||
30 | }; | ||
31 | |||
32 | configureFlags= [ | ||
33 | "--with-spf" | ||
34 | "--with-spf2-include=${libspf2'}/include/spf2" | ||
35 | "--with-spf2-lib=${libspf2'}/lib/" | ||
36 | "--with-milter=${libmilter}" | ||
37 | ]; | ||
38 | |||
39 | buildInputs = [ libspf2' libbsd openssl libmilter perl libnsl ]; | ||
40 | |||
41 | meta = { | ||
42 | description = "Free open source software implementation of the DMARC specification"; | ||
43 | homepage = "http://www.trusteddomain.org/opendmarc/"; | ||
44 | platforms = stdenv.lib.platforms.unix; | ||
45 | }; | ||
46 | }; | ||
47 | |||
48 | defaultPackage = packages.opendmarc; | 23 | defaultPackage = packages.opendmarc; |
49 | legacyPackages.opendmarc = packages.opendmarc; | 24 | legacyPackages.opendmarc = packages.opendmarc; |
50 | apps.opendmarc = flake-utils.lib.mkApp { drv = packages.opendmarc; }; | 25 | apps.opendmarc = flake-utils.lib.mkApp { drv = packages.opendmarc; }; |
@@ -69,7 +44,13 @@ | |||
69 | ''; | 44 | ''; |
70 | }; | 45 | }; |
71 | }; | 46 | }; |
72 | }) // { | 47 | }) // rec { |
48 | overlays = { | ||
49 | opendmarc = final: prev: { | ||
50 | opendmarc = self.defaultPackage."${final.system}"; | ||
51 | }; | ||
52 | }; | ||
53 | overlay = overlays.opendmarc; | ||
73 | nixosModule = { config, lib, pkgs, ... }: | 54 | nixosModule = { config, lib, pkgs, ... }: |
74 | let | 55 | let |
75 | cfg = config.services.opendmarc; | 56 | cfg = config.services.opendmarc; |