diff options
Diffstat (limited to 'flakes/opendmarc/flake.nix')
-rw-r--r-- | flakes/opendmarc/flake.nix | 39 |
1 files changed, 10 insertions, 29 deletions
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; |