summary refs log tree commit diff
path: root/pkgs/tools/security/pass
diff options
context:
space:
mode:
authorDaniël de Kok <me@danieldk.eu>2018-08-23 07:43:55 +0200
committerDaniël de Kok <me@danieldk.eu>2018-08-23 10:59:29 +0200
commitc9c3663d3eb210500ad30276a6e4ee7394391c58 (patch)
tree7e022473aedb52f3cd077b3c95e83a96689a0fc5 /pkgs/tools/security/pass
parent903306a74d31542935f6cd32758d5df2359b3b98 (diff)
downloadnixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar.gz
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar.bz2
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar.lz
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar.xz
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.tar.zst
nixlib-c9c3663d3eb210500ad30276a6e4ee7394391c58.zip
pass: Fix dependencies on Darwin
password-store on Darwin does not pass unit tests in sandboxed
builds:

- 'openssl base64' is used on Darwin to compute base64. Add openssl
  to the environment of pass.
- t0200-edit-tests.sh tests 'pass edit', which uses hdid on Darwin.
  However hdid is not available in the sandbox.
Diffstat (limited to 'pkgs/tools/security/pass')
-rw-r--r--pkgs/tools/security/pass/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix
index 1f0126005f8f..007ffdf3e3fa 100644
--- a/pkgs/tools/security/pass/default.nix
+++ b/pkgs/tools/security/pass/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, pkgs, fetchurl, buildEnv
-, coreutils, gnused, getopt, git, tree, gnupg, which, procps, qrencode
-, makeWrapper
+, coreutils, gnused, getopt, git, tree, gnupg, openssl, which, procps
+, qrencode , makeWrapper
 
 , xclip ? null, xdotool ? null, dmenu ? null
 , x11Support ? !stdenv.isDarwin
@@ -66,7 +66,8 @@ let
       which
       qrencode
       procps
-    ] ++ ifEnable x11Support [ dmenu xclip xdotool ]);
+    ] ++ optional stdenv.isDarwin openssl
+      ++ ifEnable x11Support [ dmenu xclip xdotool ]);
 
     postFixup = ''
       # Link extensions env
@@ -97,6 +98,9 @@ let
              -e 's@^GPGS=.*''$@GPG=${gnupg}/bin/gpg2@' \
              -e '/which gpg/ d' \
         tests/setup.sh
+    '' + stdenv.lib.optionalString stdenv.isDarwin ''
+      # 'pass edit' uses hdid, which is not available from the sandbox.
+      rm -f tests/t0200-edit-tests.sh
     '';
 
     doCheck = false;