Commit graph

5 commits

Author SHA1 Message Date
Artturi e42cdd2383
Merge pull request #212286 from Artturin/runonall
make-symlinks-relative: run on all outputs
2023-01-25 15:51:53 +02:00
Artturin cfb543a532 make-symlinks-relative: run on all outputs 2023-01-23 20:11:41 +02:00
Artturin ba11c6f123 setup-hooks/make-symlinks-relative.sh: match what other hooks do so
the hook doesn't output the following if $prefix doesn't exist

find: '/nix/store/...': No such file or directory

some other hooks that do this: prune-libtool-files.sh, audit-tmpdir.sh separate-debug-info.sh
2023-01-06 18:56:54 +02:00
Artturin 6c01681679 make-symlinks-relative: fix no such file or directory if output is created in postFixup
wlroots(and others) have
```
wlroots> +++ find /nix/store/3a0xwszw8n5dzzhsgfnilvsqi4hk565s-wlroots-0.15.1-examples -type l -print0
wlroots> find: '/nix/store/3a0xwszw8n5dzzhsgfnilvsqi4hk565s-wlroots-0.15.1-examples': No such file or directory
```

because the examples output is created in postFixup while this hook runs in fixupPhase
2022-12-06 00:08:11 +02:00
Andreas Rammhold cb007e69a1 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.
2020-01-15 09:26:40 +01:00