From 9cf43741c688bb772ce2ed605f6734afabc5d81f Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sun, 26 Jul 2020 01:09:14 +0200 Subject: [PATCH] opendmarc: make perl scripts work --- pkgs/development/libraries/opendmarc/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opendmarc/default.nix b/pkgs/development/libraries/opendmarc/default.nix index 7d6ae242fcf9..9b45cc244f26 100644 --- a/pkgs/development/libraries/opendmarc/default.nix +++ b/pkgs/development/libraries/opendmarc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, libmilter }: +{ stdenv, fetchFromGitHub, autoreconfHook, libmilter, perl, perlPackages, makeWrapper }: stdenv.mkDerivation rec { pname = "opendmarc"; @@ -13,16 +13,24 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "doc" ]; - nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ perl ]; + nativeBuildInputs = [ autoreconfHook makeWrapper ]; postPatch = '' substituteInPlace configure.ac --replace ' docs/Makefile' "" + patchShebangs contrib reports ''; configureFlags = [ "--with-milter=${libmilter}" ]; + postFixup = '' + for b in $bin/bin/opendmarc-{expire,import,params,reports}; do + wrapProgram $b --set PERL5LIB ${perlPackages.makeFullPerlPath (with perlPackages; [ Switch DBI DBDmysql HTTPMessage ])} + done + ''; + meta = with stdenv.lib; { description = "A free open source software implementation of the DMARC specification"; homepage = "http://www.trusteddomain.org/opendmarc/";