diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2019-11-25 13:23:14 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-01-15 09:26:40 +0100 |
commit | cb007e69a140eb990ba9b2856a6ca211da653d27 (patch) | |
tree | 8ed2e702d88ccd48356d44336c9fc03ca7355ece /pkgs/stdenv/generic | |
parent | 61f12eb907f3ec740ba648ee08ee97e908773ec2 (diff) |
stdenv: make symlinks that refer to the same output relative
While looking at the graph of all the outputs in my personal binary
cache it became obvious that we have a lot of self references within the
package set. That isn't an isuse by itself. However it increases the
size of the binary cache for every (reproducible) build of a package
that carries references to itself. You can no longer deduplicate the
outputs since they are all unique. One of the ways to get rid of (a few)
references is to rewrite all the symlinks that are currently used to be
relative symlinks. Two build of something that didn't really change but
carries a self-reference can the be store as the same NAR file again.
I quickly hacked together this change to see if that would yield and
success. My bash scripting skills are probably not great but so far it
seem to somewhat work.
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index befeb4509973..df2d35d541b8 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -53,6 +53,7 @@ let lib = import ../../../lib; in lib.makeOverridable ( let defaultNativeBuildInputs = extraNativeBuildInputs ++ [ ../../build-support/setup-hooks/move-docs.sh + ../../build-support/setup-hooks/make-symlinks-relative.sh ../../build-support/setup-hooks/compress-man-pages.sh ../../build-support/setup-hooks/strip.sh ../../build-support/setup-hooks/patch-shebangs.sh |