about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/xmlsec/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/xmlsec/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/libraries/xmlsec/default.nix b/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
index a1e6afd48b93..6d310443e70c 100644
--- a/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
+++ b/nixpkgs/pkgs/development/libraries/xmlsec/default.nix
@@ -1,9 +1,11 @@
 { stdenv, fetchurl, libxml2, gnutls, libxslt, pkgconfig, libgcrypt, libtool
-, openssl, nss, lib, runCommandCC, writeText }:
+# nss_3_53 is used instead of the latest due to a number of issues:
+# https://github.com/lsh123/xmlsec/issues?q=is%3Aissue+is%3Aopen+nss
+, openssl, nss_3_53, lib, runCommandCC, writeText }:
 
 lib.fix (self:
 let
-  version = "1.2.28";
+  version = "1.2.31";
 in
 stdenv.mkDerivation {
   pname = "xmlsec";
@@ -11,12 +13,12 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz";
-    sha256 = "1m12caglhyx08g8lh2sl3nkldlpryzdx2d572q73y3m33s0w9vhk";
+    sha256 = "mxC8Uswx5PdhYuOXXlDbJrcatJxXHYELMRymJr5aCyY=";
   };
 
   patches = [
     ./lt_dladdsearchdir.patch
-  ];
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./remove_bsd_base64_decode_flag.patch ];
   postPatch = ''
     substituteAllInPlace src/dl.c
   '';
@@ -25,10 +27,16 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ pkgconfig ];
 
-  buildInputs = [ libxml2 gnutls libxslt libgcrypt libtool openssl nss ];
+  buildInputs = [ libxml2 gnutls libxslt libgcrypt libtool openssl nss_3_53 ];
 
   enableParallelBuilding = true;
   doCheck = true;
+  checkInputs = [ nss_3_53.tools ];
+  preCheck = ''
+  substituteInPlace tests/testrun.sh \
+    --replace 'timestamp=`date +%Y%m%d_%H%M%S`' 'timestamp=19700101_000000' \
+    --replace 'TMPFOLDER=/tmp' '$(mktemp -d)'
+  '';
 
   # enable deprecated soap headers required by lasso
   # https://dev.entrouvert.org/issues/18771