summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-09-23 08:06:29 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-09-23 08:06:29 +0100
commit3c555c6729c54957aa99bb91b0faf7f728c80811 (patch)
treed5b320e1650e2a747f72e92fc9efbfd924a388e4
parent0b0169e4f12a5c27d4835da8644265535a91c878 (diff)
downloadnixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar.gz
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar.bz2
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar.lz
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar.xz
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.tar.zst
nixpkgs-3c555c6729c54957aa99bb91b0faf7f728c80811.zip
nut: strip debug symbols from cgi-bin/
Noticed by Majiir Paktu as a `gcc` development bits in the closure.
The change remove 10 dependencies worth of 150MB from the closure:

Before:

    $ nix path-info -rsSh ./result-before | nl | tail -n1
       144  /nix/store/b0jsf912bix056gg3p1nz8lh3yasm82j-nut-2.8.0                             10.0M  567.7M

After:

    $ nix path-info -rsSh ./result | nl | tail -n1
       134  /nix/store/gniv2fpm7qxdiszqwhz81iyvxpc62n52-nut-2.8.0                              9.7M  343.8M
-rw-r--r--pkgs/applications/misc/nut/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/applications/misc/nut/default.nix b/pkgs/applications/misc/nut/default.nix
index 275d6bd3d84..5596fc6010e 100644
--- a/pkgs/applications/misc/nut/default.nix
+++ b/pkgs/applications/misc/nut/default.nix
@@ -57,6 +57,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  # Add `cgi-bin` to the default list to avoid pulling in whole
+  # of `gcc` into build closure.
+  stripDebugList = [ "cgi-bin" "lib" "lib32" "lib64" "libexec" "bin" "sbin" ];
+
   postInstall = ''
     substituteInPlace $out/lib/systemd/system-shutdown/nutshutdown \
       --replace /bin/sleep "${coreutils}/bin/sleep" \