Merge pull request #257376 from trofi/postfix-leaner-closure

postfix: mangle store paths in /etc/postfix/makedefs.out
This commit is contained in:
lewo 2023-10-03 08:39:07 +02:00 committed by GitHub
commit 326215986a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,6 +99,11 @@ in stdenv.mkDerivation rec {
--prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep ]}
wrapProgram $out/libexec/postfix/postfix-script \
--prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep gawk gnused ]}
# Avoid dev-only outputs from being retained in final closure.
# `makedefs.out` is a documenttation-only file. It should be safe
# to store invalid store paths there.
sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i $out/etc/postfix/makedefs.out
'';
passthru = {