summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2016-05-11 22:50:49 +0200
committerRobert Helgesson <robert@rycee.net>2016-06-13 22:18:59 +0200
commit96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0 (patch)
treec7cdc6f78e8c5d18c82a15e8cb12d53622e45ebf /pkgs/data
parente68191e6c4d8d2ab45590b7b5ed020b909883247 (diff)
downloadnixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar.gz
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar.bz2
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar.lz
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar.xz
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.tar.zst
nixpkgs-96fc1e19b84469ab5822b03d3ce555cc5f7fb9c0.zip
cacert: remove dependency on LWP
The `mk-ca-bundle.pl` script manages quite well using only curl but
fails without LWP being present due to a `use` statement. This removes
the Perl import of the LWP library and adds curl as a build input.
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/misc/cacert/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix
index 0b125485fd4..3ce6dc81a39 100644
--- a/pkgs/data/misc/cacert/default.nix
+++ b/pkgs/data/misc/cacert/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, nss, curl, perl, perlPackages }:
+{ stdenv, nss, curl, perl }:
 
 stdenv.mkDerivation rec {
   name = "nss-cacert-${nss.version}";
@@ -7,9 +7,16 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     unpackFile ${curl.src};
+
+    # Remove dependency on LWP, curl is enough. Also, since curl here
+    # is working on a local file it will not actually get a 200 OK, so
+    # remove that expectation.
+    substituteInPlace curl-*/lib/mk-ca-bundle.pl \
+      --replace 'use LWP::UserAgent;' "" \
+      --replace ' && $out[0] == 200' ""
   '';
 
-  nativeBuildInputs = [ perl perlPackages.LWP ];
+  nativeBuildInputs = [ curl perl ];
 
   buildPhase = ''
     perl curl-*/lib/mk-ca-bundle.pl -d "file://$(pwd)/nss/lib/ckfw/builtins/certdata.txt" ca-bundle.crt