-
Notifications
You must be signed in to change notification settings - Fork 107
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
digga tries to do something clever by loading all inputs' overlays, but fails #496
Comments
Checkpoint Note: This originates from a desire to pull the overlay's keys out of an overlay. Before that, it was |
I've read the file more than twice now, and I can't figure out why that code exists, let alone why it behaves the way it does. Why does this problem even show up? https://github.com/sweenu/nixfiles/blob/main/flake.nix doesn't to do anything flake related, except I'm not sure if I actually want to know. |
Here is the motivation. The goal has been to automatically export everything that is local to the repo to downstream users, nicely namespaced per channel, so that downstream has an idea on which channel an overlay is supposed to work ("version bands light"). I've long switched myself to And since the (client facing) flake schema isn't also (mis-)used via
I don't think I actually understand this. I noticed though that there is a tryEval block in FUP which we may assume was originally intended to catch these problems, but maybe it lacks the |
Accidental negation; edited to fix that.
from the linked comment:
Then it seems like the mistake was pulling the overlays out of their context without remembering anything about their context. I don't understand why you'd lose track of which overlay is which.
Unless you're interested in fixing a bunch of expressions you've switched away from, I'm going to leave it here. |
Yes! That's not good design and I remember clearly how and why I grew an aversion for accessing I'll keep this on my todo, after reloading context from the back of my memory, maybe there's actually a quick fix to flakes-utils-plus possible. |
Attempted fix: gytis-ivaskevicius/flake-utils-plus#126 cc @sweenu |
|
Ah! 😏 Then it's strange why it doesn't error on the |
|
Expected Behavior
Do not load the overlays of all inputs. Not appropriate for a framework, as it's O(n), and makes a single overlay strict in all overlays.
Do not fail if loading an overlay of an input.
Current Behavior
See
Steps to Reproduce
Additional Context
pkgs.stdenv.hostPlatform.system
is the recommended way to get asystem
from apkgs
. There's been talk of deprecatingpkgs.system
, and Nixpkgs has in large part migrated.You might want to do something like
fakePkgs = mapAttrs (k: v: throw "exportOverlays: not allowing access to the real Nixpkgs for X reason, when the overlay tried to access
${k}") realPkgs
to improve the UX a tiny bit. Might breakif pkgs?foo then seq pkgs.foo bar
type of logic though.Your Environment
Nix 2.13.0pre20230103_1534133.
The text was updated successfully, but these errors were encountered: