about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/lbdb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/lbdb/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/lbdb/default.nix37
1 files changed, 16 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/tools/misc/lbdb/default.nix b/nixpkgs/pkgs/tools/misc/lbdb/default.nix
index fd8b805743ac..ea4b2a9cbbc5 100644
--- a/nixpkgs/pkgs/tools/misc/lbdb/default.nix
+++ b/nixpkgs/pkgs/tools/misc/lbdb/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, fetchpatch, perl, perlPackages, finger_bsd, makeWrapper
+{ lib, stdenv, fetchurl, fetchpatch, perl, finger_bsd
 , abook ? null
 , gnupg ? null
 , goobook ? null
@@ -8,9 +8,8 @@
 
 let
   version = "0.48.1";
+  perl' = perl.withPackages (p: with p; [ ConvertASN1 perlldap AuthenSASL ]);
 in
-with lib;
-with perlPackages;
 stdenv.mkDerivation {
   pname = "lbdb";
   inherit version;
@@ -19,20 +18,20 @@ stdenv.mkDerivation {
     sha256 = "1gr5l2fr9qbdccga8bhsrpvz6jxigvfkdxrln9wyf2xpps5cdjxh";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ goobook perl ConvertASN1 perlldap AuthenSASL ]
-    ++ optional (!stdenv.isDarwin) finger_bsd
-    ++ optional   (abook != null) abook
-    ++ optional   (gnupg != null) gnupg
-    ++ optional (goobook != null) goobook
-    ++ optional   (khard != null) khard
-    ++ optional      (mu != null) mu;
+  buildInputs = [ goobook perl' ]
+    ++ lib.optional (!stdenv.isDarwin) finger_bsd
+    ++ lib.optional   (abook != null) abook
+    ++ lib.optional   (gnupg != null) gnupg
+    ++ lib.optional (goobook != null) goobook
+    ++ lib.optional   (khard != null) khard
+    ++ lib.optional      (mu != null) mu;
+
   configureFlags = [ ]
-    ++ optional   (abook != null) "--with-abook"
-    ++ optional   (gnupg != null) "--with-gpg"
-    ++ optional (goobook != null) "--with-goobook"
-    ++ optional   (khard != null) "--with-khard"
-    ++ optional      (mu != null) "--with-mu";
+    ++ lib.optional   (abook != null) "--with-abook"
+    ++ lib.optional   (gnupg != null) "--with-gpg"
+    ++ lib.optional (goobook != null) "--with-goobook"
+    ++ lib.optional   (khard != null) "--with-khard"
+    ++ lib.optional      (mu != null) "--with-mu";
 
   patches = [ ./add-methods-to-rc.patch
     # fix undefined exec_prefix. Remove with the next release
@@ -42,12 +41,8 @@ stdenv.mkDerivation {
       excludes = [ "debian/changelog" ];
     })
   ];
-  postFixup = "wrapProgram $out/lib/mutt_ldap_query --prefix PERL5LIB : "
-    + "${AuthenSASL}/${perl.libPrefix}"
-    + ":${ConvertASN1}/${perl.libPrefix}"
-    + ":${perlldap}/${perl.libPrefix}";
 
-  meta = {
+  meta = with lib; {
     homepage = "https://www.spinnaker.de/lbdb/";
     license = licenses.gpl2;
     platforms = platforms.all;