summary refs log tree commit diff
path: root/pkgs/development/libraries/gpgme
diff options
context:
space:
mode:
authorKirill Elagin <kirelagin@gmail.com>2020-04-15 13:13:27 +0300
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2020-04-21 08:37:12 +0200
commit5470d96645194dfb65a1acfce317703da6da8aad (patch)
treea556f4c341a88bc2953ac09554e1d24c5740df77 /pkgs/development/libraries/gpgme
parent6673a4988e4a4ff25ca94a84d8e2acf92453dbf1 (diff)
downloadnixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar.gz
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar.bz2
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar.lz
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar.xz
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.tar.zst
nixpkgs-5470d96645194dfb65a1acfce317703da6da8aad.zip
pgpgme: Fix build with python on macOS
* Replace LD_LIBRARY_PATH with OS-specific name (e.g. DYLD_LIBRARY_PATH
  on macOS).
* Disable Python tests on macOS, because they use gpg, which fails due
  to a very long socket path (https://github.com/NixOS/nix/pull/1085).

The former should be fixed upstream. The latter is a Nix-specific issue,
but it can be worked-around upstream by making Python tests respect
--disable-gpg-test.
Diffstat (limited to 'pkgs/development/libraries/gpgme')
-rw-r--r--pkgs/development/libraries/gpgme/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix
index 6a31515be3f..a271b72c2e7 100644
--- a/pkgs/development/libraries/gpgme/default.nix
+++ b/pkgs/development/libraries/gpgme/default.nix
@@ -49,6 +49,15 @@ stdenv.mkDerivation rec {
 
   postPatch =''
     substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
+  ''
+  # Apply only on Darwin to save rebuilds on Linux
+     + lib.optionalString stdenv.isDarwin ''
+    sed -i "s/LD_LIBRARY_PATH/@shlibpath_var@/" lang/python/tests/Makefile.in
+    sed -i "s/ac_subst_vars='/ac_subst_vars='shlibpath_var\n/" configure
+  ''
+  # Disable python tests on Darwin as they use gpg (see configureFlags below)
+     + lib.optionalString stdenv.isDarwin ''
+    sed -i "s/SUBDIRS = \. tests/SUBDIRS = ./" lang/python/Makefile.in
   '';
 
   configureFlags = [