-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Flake fragments should prioritise the top-most attribute. #5651
Comments
Copying #5657 (comment) here as it really applies to the issue, not the implementation: This is going to make More generally, if I feel like perhaps a better approach is to have a separate syntax for "don't apply any prefixes to this fragment". For example, something like |
That’s true, but it also play the other way: if An “interesting” side-effect of the current behavior is that if my flake has both a toplevel |
@regnat Despite my attempt to move the discussion here, it has continued in the PR (see #5657 (comment)). |
I marked this as stale due to inactivity. → More info |
I'm looking at an approach like this: master...flox:nix:disable_attrpath_resolution If this is preferable I can add tests/docs/etc. It's a bit odd because we're using an invalid URL, but it is also for the unique situations when one wants to express "don't perform automatic attrPath resolution". |
Why would
We need to stop pretending that they're universal. |
Something perhaps more compatible might be
It's not a valid nix attrpath but it allows for the attrpath to be parsed as |
In fact that already works by adding
to the flake output, which can be injected by nix. |
Edit: even newer: master...flox:nix:disable_attrpath_resolution Supports |
Describe the bug
Doing
nix build x#y
,nix eval x#y
or similar, will cause Nix to evaluatepackages.<system>.y
beforey
.This is problematic in my case, because
packages
uses IFD, whereasy
does not.I want to be able to evaluate
y
, which does not use IFD, with--no-allow-import-from-derivation
.Steps To Reproduce
packages
use IFD.y
.nix --no-allow-import-from-derivation eval .#y
. This should fail.Expected behavior
Nix should evaluate the top-most attribute before trying the one in
packages
and similar.nix-env --version
outputnix (Nix) 2.5pre20211007_844dd90
The text was updated successfully, but these errors were encountered: