about summary refs log tree commit diff
path: root/pkgs/tools/misc/keychain/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/keychain/default.nix')
-rw-r--r--pkgs/tools/misc/keychain/default.nix27
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/tools/misc/keychain/default.nix b/pkgs/tools/misc/keychain/default.nix
index 881c65ef74b6..2eb63f09216f 100644
--- a/pkgs/tools/misc/keychain/default.nix
+++ b/pkgs/tools/misc/keychain/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, makeWrapper, coreutils, openssh, gnupg
+, procps, gnugrep, gawk, findutils, gnused }:
 
 stdenv.mkDerivation {
   name = "keychain-2.7.1";
@@ -8,17 +9,27 @@ stdenv.mkDerivation {
     sha256 = "14ai6wjwnj09xnl81ar2dlr5kwb8y1k5ck6nc549shpng0zzw1qi";
   };
 
-  phases = "unpackPhase buildPhase";
+  phases = [ "unpackPhase" "buildPhase" ];
 
-  buildPhase =
-    ''
-      mkdir -p $out/bin
-      cp keychain $out/bin
-    '';
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = ''
+    mkdir -p $out/bin
+    cp keychain $out/bin
+    wrapProgram $out/bin/keychain \
+      --prefix PATH ":" "${coreutils}/bin" \
+      --prefix PATH ":" "${openssh}/bin" \
+      --prefix PATH ":" "${gnupg}/bin" \
+      --prefix PATH ":" "${gnugrep}/bin" \
+      --prefix PATH ":" "${gnused}/bin" \
+      --prefix PATH ":" "${findutils}/bin" \
+      --prefix PATH ":" "${gawk}/bin" \
+      --prefix PATH ":" "${procps}/bin"
+  '';
 
   meta = { 
     description = "Keychain management tool";
     homepage = "http://www.gentoo.org/proj/en/keychain/";
-    license = "GPL2";
+    license = stdenv.lib.licenses.gpl2;
   };
 }