This will allow the code for https://github.com/NixOS/nixpkgs/issues/447514
to make sure that the right team is requested for review,
even if it has been renamed in the meantime.
While the matching is currently based on the teams slug/name and not the
id, renames won't cause problems with `lib.teams`, because CI would
error if there's no match. Changing this can be future work.
The before and after of
nix-instantiate --eval -A lib.teams --strict --json | jq 'walk(if type == "array" then sort else . end)'
has been ensured to be negligible, only consisting of minor team
shortName and scope differences
This code was more careful before
<dd435697b3>
(it didn't assume that `unsafeGetAttrPos` always returns a non-null
location). Unfortunately, `unsafeGetAttrPos` *does* return `null` when
dealing with `nix repl`:
```
nix-repl> f = {foo}: foo
nix-repl> builtins.unsafeGetAttrPos "foo" (builtins.functionArgs f)
null
```
Here's how to reproduce the issue.
*Before* this fix:
```
nix-repl> f = {foo}: foo
nix-repl> myCallPackage = lib.callPackageWith {}
nix-repl> myCallPackage f {}
error:
… while calling the 'abort' builtin
at /home/jeremy/src/github.com/NixOS/nixpkgs/lib/customisation.nix:323:7:
322| else
323| abort "lib.customisation.callPackageWith: ${error}";
| ^
324|
… while selecting an attribute
at /home/jeremy/src/github.com/NixOS/nixpkgs/lib/customisation.nix:310:14:
309| "Function called without required argument \"${arg}\" at "
310| + "${loc.file}:${toString loc.line}${prettySuggestions (getSuggestions arg)}";
| ^
311|
error: expected a set but found null: null
```
*After*:
```
nix-repl> f = {foo}: foo
nix-repl> myCallPackage = lib.callPackageWith {}
nix-repl> myCallPackage f {}
error:
… while calling the 'abort' builtin
at /home/jeremy/src/github.com/NixOS/nixpkgs/lib/customisation.nix:332:7:
331| # Inputs
332|
| ^
333| `autoArgs`
error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "foo" at <unknown location>'
```
- `lib.attrsets.cartesianProductOfSets` was deprecated in 228621e42d
- `lib.attrsets.zip` was deprecated in fcbc4fe9ff (2013!)
- `lib.attrsets.zipWithNames` was deprecated in 00127bef3f (2009!)
The time has come.
Rust does not know how to parse "gnuabielfv{1,2}", so simplify those down to just "gnu".
This obsoletes the manual rustcTarget fix in the ppc64-elfv1 example.