Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv/generic: throw when using stdenv.lib and disallowing aliases #111447

Merged
merged 1 commit into from Feb 7, 2021

Conversation

siraben
Copy link
Member

@siraben siraben commented Jan 31, 2021

Motivation for this change

As requested by @jtojnar

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@siraben siraben changed the title stdenv/generic: throw when using stdenv.lib stdenv/generic: throw when using stdenv.lib and disallowing aliases Jan 31, 2021
@jtojnar
Copy link
Contributor

jtojnar commented Feb 7, 2021

CI looks fine, let’s see if this causes any mayhem.

@jtojnar jtojnar merged commit 2d30bf8 into NixOS:master Feb 7, 2021
@siraben siraben deleted the stdenv-lib-alias-throw branch February 7, 2021 02:02
@marsam
Copy link
Contributor

marsam commented Feb 7, 2021

This breaks nix-darwin

$ darwin-rebuild build
building the system configuration...
error: attribute 'allowAlises' missing, at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/default.nix:156:16
(use '--show-trace' to show detailed location information)
darwin-rebuild build --show-trace
$ darwin-rebuild build --show-trace
building the system configuration...
error: while evaluating the attribute 'buildCommand' of the derivation 'darwin-system-21.03.git.7d66c34+darwin3.dca3806' at /Users/marsam/code/nix-config/darwin/modules/system/default.nix:74:7:
while evaluating the attribute 'buildCommand' of the derivation 'etc' at /Users/marsam/code/nix-config/nixpkgs/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating 'concatMapStringsSep' at /Users/marsam/code/nix-config/nixpkgs/lib/strings.nix:110:5, called from /Users/marsam/code/nix-config/darwin/modules/system/etc.nix:40:11:
while evaluating anonymous function at /Users/marsam/code/nix-config/darwin/modules/system/etc.nix:40:37, called from undefined position:
while evaluating the attribute 'source' at undefined position:
while evaluating 'g' at /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:294:19, called from undefined position:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:139:72, called from /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:297:20:
while evaluating the attribute 'value' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:512:9:
while evaluating the option `environment.etc.bashrc.source':
while evaluating the attribute 'mergedValue' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:544:5:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:546:17, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:546:12:
while evaluating 'check' at /Users/marsam/code/nix-config/nixpkgs/lib/types.nix:345:15, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:546:22:
while evaluating the attribute 'text' of the derivation 'etc-bashrc' at /Users/marsam/code/nix-config/nixpkgs/pkgs/build-support/trivial-builders.nix:7:7:
while evaluating the attribute 'text' at undefined position:
while evaluating 'g' at /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:294:19, called from undefined position:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:139:72, called from /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:297:20:
while evaluating the attribute 'value' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:512:9:
while evaluating the option `environment.etc.bashrc.text':
while evaluating the attribute 'mergedValue' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:544:5:
while evaluating the attribute 'values' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:538:9:
while evaluating the attribute 'values' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:637:7:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:524:28, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:524:17:
while evaluating definitions from `/Users/marsam/code/nix-config/darwin/modules/programs/bash':
while evaluating 'dischargeProperties' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:596:25, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:525:137:
while evaluating the attribute 'value' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:379:44:
while evaluating the attribute 'interactiveShellInit' at undefined position:
while evaluating 'g' at /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:294:19, called from undefined position:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:139:72, called from /Users/marsam/code/nix-config/nixpkgs/lib/attrsets.nix:297:20:
while evaluating the attribute 'value' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:512:9:
while evaluating the option `programs.bash.interactiveShellInit':
while evaluating the attribute 'mergedValue' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:544:5:
while evaluating the attribute 'values' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:538:9:
while evaluating the attribute 'values' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:637:7:
while evaluating anonymous function at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:524:28, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:524:17:
while evaluating definitions from `/Users/marsam/code/nix-config/darwin.nix':
while evaluating 'dischargeProperties' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:596:25, called from /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:525:137:
while evaluating the attribute 'value' at /Users/marsam/code/nix-config/nixpkgs/lib/modules.nix:379:44:
while evaluating 'assertValidity' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:296:20, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:300:18:
while evaluating 'checkValidity' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:273:19, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:297:18:
while evaluating 'hasDeniedUnfreeLicense' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:76:28, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:280:12:
while evaluating 'hasUnfreeLicense' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:52:22, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:77:5:
while evaluating 'isUnfree' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:50:14, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:54:5:
while evaluating 'toList' at /Users/marsam/code/nix-config/nixpkgs/lib/lists.nix:283:12, called from /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/check-meta.nix:54:15:
while evaluating the attribute 'meta.license' at /Users/marsam/code/nix-config/overlays/misc.nix:36:7:
while evaluating the attribute 'lib' at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/default.nix:156:7:
attribute 'allowAlises' missing, at /Users/marsam/code/nix-config/nixpkgs/pkgs/stdenv/generic/default.nix:156:16

@siraben
Copy link
Member Author

siraben commented Feb 7, 2021

This has been hot-fixed in #112255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants