about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBadi' Abdul-Wahid <abdulwahidc@gmail.com>2015-08-12 10:29:30 -0400
committerBadi' Abdul-Wahid <abdulwahidc@gmail.com>2015-08-12 11:46:56 -0400
commitaed29abec7a940d33832f3b6651ede8657a63bbf (patch)
tree7745a0b65b6b7fe900872737442823b583e6de33 /pkgs
parent5343f1fab1401f4fe2401e395840f440046c0aae (diff)
keychain: support Darwin as a platform
This change provides support for Darwin as a platform by making the
`procps` parameter optional. If the platform is linux, then
`procps`/bin is added to the wrapped keychain's PATH, else not.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/keychain/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/tools/misc/keychain/default.nix b/pkgs/tools/misc/keychain/default.nix
index 0892061a50d03..6ffd36312a3e7 100644
--- a/pkgs/tools/misc/keychain/default.nix
+++ b/pkgs/tools/misc/keychain/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchFromGitHub, makeWrapper, coreutils, openssh, gnupg
-, perl, procps, gnugrep, gawk, findutils, gnused }:
+, perl, procps, gnugrep, gawk, findutils, gnused
+, withProcps ? stdenv.isLinux }:
 
 stdenv.mkDerivation rec {
   name = "keychain-${version}";
@@ -26,12 +27,16 @@ stdenv.mkDerivation rec {
       --prefix PATH ":" "${gnused}/bin" \
       --prefix PATH ":" "${findutils}/bin" \
       --prefix PATH ":" "${gawk}/bin" \
-      --prefix PATH ":" "${procps}/bin"
+      ${if withProcps then ("--prefix PATH \":\" ${procps}/bin") else ""}
   '';
 
   meta = {
     description = "Keychain management tool";
     homepage = "http://www.funtoo.org/Keychain";
     license = stdenv.lib.licenses.gpl2;
+    # other platforms are untested (AFAIK)
+    platforms =
+      with stdenv.lib;
+      platforms.linux ++ platforms.darwin;
   };
 }