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
1 changed files with 4 additions and 9 deletions
|
@ -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)) ];
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
cat $files > $out
|
||||
'';
|
||||
caCertificates = pkgs.runCommand "ca-certificates.crt" {
|
||||
files = cfg.certificateFiles ++ [ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
|
||||
preferLocalBuild = true;
|
||||
} "awk 1 $files > $out"; # awk ensures a newline between each pair of consecutive files
|
||||
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue