Merge pull request #123272 from kini/nixos/security.pki/pems-without-final-newline
nixos/security.pki: handle PEMs w/o a final newline
This commit is contained in:
commit
c3b27282d7
|
@ -10,15 +10,10 @@ let
|
|||
blacklist = cfg.caCertificateBlacklist;
|
||||
};
|
||||
|
||||
caCertificates = pkgs.runCommand "ca-certificates.crt"
|
||||
{ files =
|
||||
cfg.certificateFiles ++
|
||||
[ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
|
||||
caCertificates = pkgs.runCommand "ca-certificates.crt" {
|
||||
files = cfg.certificateFiles ++ [ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
cat $files > $out
|
||||
'';
|
||||
} "awk 1 $files > $out"; # awk ensures a newline between each pair of consecutive files
|
||||
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue