diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-08-18 11:48:48 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2022-08-18 11:52:49 +0100 |
commit | 347e5f473e7de7856d364063d1d46f3b768b0463 (patch) | |
tree | 182a81135c145fa604f6617616e996d205127b94 /pkgs/applications/file-managers | |
parent | 543ebf97a3a510b96283ed1e0adcfb35be2219c7 (diff) |
mc: stop retaining configure arguments in the final binary
Reduces closure size of cross-compiled binary a bit by not retaining build-time perl and friends. Before: $ nix path-info -Sh $(nix-build -A pkgsCross.ppc64.mc) | unnix /<<NIX>>/mc-powerpc64-unknown-linux-gnu-4.8.28 273.7M After: $ nix path-info -Sh $(nix-build -A pkgsCross.ppc64.mc) | unnix /<<NIX>>/mc-powerpc64-unknown-linux-gnu-4.8.28 198.6M
Diffstat (limited to 'pkgs/applications/file-managers')
-rw-r--r-- | pkgs/applications/file-managers/mc/default.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/applications/file-managers/mc/default.nix b/pkgs/applications/file-managers/mc/default.nix index 0153b8fe93c6d..d261dab6e6e2a 100644 --- a/pkgs/applications/file-managers/mc/default.nix +++ b/pkgs/applications/file-managers/mc/default.nix @@ -67,6 +67,10 @@ stdenv.mkDerivation rec { "PERL=${perl}/bin/perl" # used for .hlp generation at build time: "PERL_FOR_BUILD=${buildPackages.perl}/bin/perl" + + # configure arguments have a bunch of build-only dependencies. + # Avoid their retention in final closure. + "--disable-configure-args" ]; postPatch = '' @@ -77,11 +81,6 @@ stdenv.mkDerivation rec { --replace /bin/cat ${coreutils}/bin/cat ''; - preFixup = '' - # remove unwanted build-dependency references - sed -i -e "s!PKG_CONFIG_PATH=''${PKG_CONFIG_PATH}!PKG_CONFIG_PATH=$(echo "$PKG_CONFIG_PATH" | sed -e 's/./0/g')!" $out/bin/mc - ''; - postFixup = lib.optionalString (!stdenv.isDarwin) '' # libX11.so is loaded dynamically so autopatch doesn't detect it patchelf \ |