nixpkgs/pkgs/data/misc/cacert/default.nix
2015-05-29 13:52:07 -07:00

30 lines
724 B
Nix

{ stdenv, nss, curl-full, perl, perlPackages }:
stdenv.mkDerivation rec {
name = "nss-cacert-${nss.version}";
src = nss.src;
postPatch = ''
unpackFile ${curl-full.src};
'';
nativeBuildInputs = [ perl ] ++ (with perlPackages; [ LWP ]);
buildPhase = ''
perl curl-*/lib/mk-ca-bundle.pl -d "file://$(pwd)/nss/lib/ckfw/builtins/certdata.txt" ca-bundle.crt
'';
installPhase = ''
mkdir -pv $out
cp -v ca-bundle.crt $out
'';
meta = with stdenv.lib; {
homepage = http://curl.haxx.se/docs/caextract.html;
description = "A bundle of X.509 certificates of public Certificate Authorities (CA)";
platforms = platforms.all;
maintainers = with maintainers; [ wkennington ];
};
}