Without the change the eval fails as:
$ nix-instantiate -A minimal-bootstrap.bash --argstr system i686-linux
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'bash-5.2.15'
whose name attribute is located at pkgs/os-specific/linux/minimal-bootstrap/bash/2.nix:85:19
… while evaluating attribute 'PATH' of derivation 'bash-5.2.15'
at pkgs/os-specific/linux/minimal-bootstrap/bash/2.nix:108:11:
107| SHELL = "${bash_2_05}/bin/bash";
108| PATH = lib.makeBinPath (
| ^
109| (env.nativeBuildInputs or [ ])
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: function 'anonymous lambda' called without required argument 'rewriteURL'
at /tmp/nixpkgs/pkgs/build-support/fetchurl/boot.nix:5:1:
4|
5| {
| ^
6| rewriteURL,
Picking up where #414321 left off, we can now simplify some things by
using `pkgs.libc` or `targetPackages.libc` consistently.
Individual packages should probably continue using `stdenv.cc.libc`, for
now at least, since it is possible they are given a `stdenv.cc` with an
alternative libc, but for the treewide code, the top-level `libc`
package is preferable and easier to work with.
Co-authored-by: Tristan Ross <rosscomputerguy@protonmail.com>
This allows on-the-fly rewriting of URLs before they are passed from
fetchurl (or fetchurlBoot) to curl.
The intended use is to allow inserting company-internal mirrors, or
working around company firewalls and similar network restrictions,
without having to extensively patch across all of nixpkgs. Instead,
users can pass a function in their nixpkgs that performs the necessary
URL rewrites.
Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>