We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.
CC @FRidh @matthewbauer
This adds a warning to the top of each “boot” package that reads:
Note: this package is used for bootstrapping fetchurl, and thus cannot
use fetchpatch! All mutable patches (generated by GitHub or cgit) that
are needed here should be included directly in Nixpkgs as files.
This makes it clear to maintainer that they may need to treat this
package a little differently than others. Importantly, we can’t use
fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale
hashes, we need to include patches that are subject to changing
overtime (for instance, gitweb’s patches contain a version number at
the bottom).
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/xz/versions.
These checks were done:
- built on NixOS
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/unxz -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/unxz --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzcat -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzcat --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzma -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzma --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/unlzma -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/unlzma --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzcat -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzcat --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzdiff --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzdiff --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzgrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzgrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzgrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzmore -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzmore --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzmore help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzmore --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzless -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzless --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzless help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzless --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzcmp --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzcmp --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzegrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzegrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzegrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzfgrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzfgrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzfgrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzdiff --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzdiff --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzcmp --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzcmp --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzgrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzgrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzgrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzegrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzegrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzegrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzfgrep --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzfgrep -V’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzfgrep --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmore -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmore --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmore help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmore --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzless -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzless --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzless help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzless --version’ and found version 5.2.4
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzdec -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xzdec --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmadec -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmadec --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xz -h’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/xz --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmainfo --help’ got 0 exit code
- ran ‘/nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin/bin/lzmainfo --version’ and found version 5.2.4
- found 5.2.4 with grep in /nix/store/04jcagznwznnhjq88jlr9pn28w2qvyqw-xz-5.2.4-bin
- directory tree listing: https://gist.github.com/5bf57c36243ce0756cb390f685d22fdf
The following parameters are now available:
* hardeningDisable
To disable specific hardening flags
* hardeningEnable
To enable specific hardening flags
Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.
cc-wrapper supports the following flags:
* fortify
* stackprotector
* pie (disabled by default)
* pic
* strictoverflow
* format
* relro
* bindnow
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
Many (less easily automatically converted) old-style strings
remain.
Where there was any possible ambiguity about the exact version or
variant intended, nothing was changed. IANAL, nor a search robot.
Use `with stdenv.lib` wherever it makes sense.
- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes
Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.