diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix index 0b125485fd45..3ce6dc81a396 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