From df0016a8ce3ca9d3095eb5f08591f007f79db141 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sun, 15 Feb 2015 16:14:13 +0000 Subject: [PATCH] Fix pass on darwin --- pkgs/tools/security/pass/default.nix | 2 ++ pkgs/tools/security/pass/no-darwin-getopt.patch | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 pkgs/tools/security/pass/no-darwin-getopt.patch diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index bca6fc3d7d1..0e37443c3ed 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { sha256 = "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik"; }; + patches = if stdenv.isDarwin then [ ./no-darwin-getopt.patch ] else null; + buildInputs = [ makeWrapper ]; meta = with stdenv.lib; { diff --git a/pkgs/tools/security/pass/no-darwin-getopt.patch b/pkgs/tools/security/pass/no-darwin-getopt.patch new file mode 100644 index 00000000000..e8f7e138ff0 --- /dev/null +++ b/pkgs/tools/security/pass/no-darwin-getopt.patch @@ -0,0 +1,9 @@ +diff -Naur password-store-1.6.5-orig/src/platform/darwin.sh password-store-1.6.5/src/platform/darwin.sh +--- password-store-1.6.5-orig/src/platform/darwin.sh 2015-01-28 16:43:02.000000000 +0000 ++++ password-store-1.6.5/src/platform/darwin.sh 2015-02-15 16:09:02.000000000 +0000 +@@ -31,5 +31,4 @@ + mount -t hfs -o noatime -o nobrowse "$DARWIN_RAMDISK_DEV" "$SECURE_TMPDIR" || die "Error: could not mount filesystem on ramdisk." + } + +-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null && echo /opt/local; } || echo /usr/local)/bin/getopt" + SHRED="srm -f -z"