summary refs log tree commit diff
path: root/pkgs/development/libraries/xmlsec
diff options
context:
space:
mode:
authorCaleb Land <caleb@land.fm>2020-11-01 16:55:14 -0500
committerGitHub <noreply@github.com>2020-11-01 16:55:14 -0500
commit7698197323bca022727730b1e25c141237db6901 (patch)
tree73aace8914b44f55412f5edffb4f746d66e06d3f /pkgs/development/libraries/xmlsec
parentb22433a306ed9f4e5031353c9369ebcddf09b05d (diff)
downloadnixpkgs-7698197323bca022727730b1e25c141237db6901.tar
nixpkgs-7698197323bca022727730b1e25c141237db6901.tar.gz
nixpkgs-7698197323bca022727730b1e25c141237db6901.tar.bz2
nixpkgs-7698197323bca022727730b1e25c141237db6901.tar.lz
nixpkgs-7698197323bca022727730b1e25c141237db6901.tar.xz
nixpkgs-7698197323bca022727730b1e25c141237db6901.tar.zst
nixpkgs-7698197323bca022727730b1e25c141237db6901.zip
xmlsec: fix build on macOS (#101319)
* xmlsec: fix build on macOS

xmlsec detects the Darwin platform and uses the -D flag with base64, but nix uses GNU base64 which requires -d.

This patch removes the platform test and always uses the -d flag.
Diffstat (limited to 'pkgs/development/libraries/xmlsec')
-rw-r--r--pkgs/development/libraries/xmlsec/default.nix2
-rw-r--r--pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch12
2 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/libraries/xmlsec/default.nix b/pkgs/development/libraries/xmlsec/default.nix
index 0d6fd9611c4..6b3468e5d57 100644
--- a/pkgs/development/libraries/xmlsec/default.nix
+++ b/pkgs/development/libraries/xmlsec/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
 
   patches = [
     ./lt_dladdsearchdir.patch
-  ];
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./remove_bsd_base64_decode_flag.patch ];
   postPatch = ''
     substituteAllInPlace src/dl.c
   '';
diff --git a/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch b/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch
new file mode 100644
index 00000000000..700fad7e3dd
--- /dev/null
+++ b/pkgs/development/libraries/xmlsec/remove_bsd_base64_decode_flag.patch
@@ -0,0 +1,12 @@
+--- a/tests/testEnc.sh	2020-04-20 14:30:32.000000000 -0400
++++ b/tests/testEnc.sh	2020-10-21 22:09:25.000000000 -0400
+@@ -405,9 +405,6 @@
+             else
+                 # generate binary file out of base64
+                 DECODE="-d"
+-                if [ "`uname`" = "Darwin" ]; then
+-		    DECODE="-D"
+-                fi
+                 cat "$topfolder/$base_test_name.data" | base64 $DECODE > $tmpfile.3
+                 execEncTest "$res_success" \
+                     "" \