Skip to content

Commit

Permalink
cacert: add hashed output (#370023)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukegb authored Jan 3, 2025
2 parents 07a7125 + edecaf6 commit a2891e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/data/misc/cacert/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ stdenv.mkDerivation rec {
"out"
"unbundled"
"p11kit"
"hashed"
];

nativeBuildInputs = [ buildcatrust ];

buildPhase = ''
mkdir unbundled
mkdir unbundled hashed
buildcatrust \
--certdata_input certdata.txt \
--ca_bundle_input "${extraCertificatesBundle}" ${
Expand All @@ -89,6 +90,7 @@ stdenv.mkDerivation rec {
--ca_bundle_output ca-bundle.crt \
--ca_standard_bundle_output ca-no-trust-rules-bundle.crt \
--ca_unpacked_output unbundled \
--ca_hashed_unpacked_output hashed \
--p11kit_output ca-bundle.trust.p11-kit
'';

Expand All @@ -103,6 +105,11 @@ stdenv.mkDerivation rec {
# install individual certs in unbundled output
install -D -t "$unbundled/etc/ssl/certs" unbundled/*.crt
# install hashed certs in hashed output
# use cp as install doesn't copy symlinks
mkdir -p $hashed/etc/ssl/certs/
cp -P hashed/* $hashed/etc/ssl/certs/
'';

setupHook = ./setup-hook.sh;
Expand Down

0 comments on commit a2891e6

Please sign in to comment.