Overlaying nix does not propagate up to NixOS systems definitions				#1
		
		
	
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	Affects/CppNix
		
			Affects/Nightly
		
			Affects/Only nightly
		
			Affects/Stable
		
			Area/build-packaging
		
			Area/cli
		
			Area/evaluator
		
			Area/fetching
		
			Area/flakes
		
			Area/language
		
			Area/lix ci
		
			Area/nix-eval-jobs
		
			Area/profiles
		
			Area/protocol
		
			Area/releng
		
			Area/remote-builds
		
			Area/repl
		
			Area/repl/debugger
		
			Area/store
		
			bug
		
			Context
contributors
		
			Context
drive-by
		
			Context
maintainers
		
			Context
RFD
		
			crash 💥
		
			Cross Compilation
		
			devx
		
			docs
		
			Downstream Dependents
		
			E/easy
		
			E/hard
		
			E/help wanted
		
			E/reproducible
		
			E/requires rearchitecture
		
			Feature/S3
		
			imported
		
			Language/Bash
		
			Language/C++
		
			Language/NixLang
		
			Language/Python
		
			Language/Rust
		
			Needs Langver
		
			OS/Linux
		
			OS/macOS
		
			performance
		
			regression
		
			release-blocker
		
			stability
		
			Status
blocked
		
			Status
invalid
		
			Status
postponed
		
			Status
wontfix
		
			testing
		
			testing/flakey
		
			Topic/Large Scale Installations
		
			ux
		
		
	
		No milestone
		
			
		
	No project
	
		
	
	
	
	
		No assignees
		
	
	
	
	
		6 participants
	
	
		
		
	Notifications
	
		
	
	
	
		
	
	
	Due date
No due date set.
	
		Dependencies
		
		
	
	
	No dependencies set.
	
	
		
	
	
		
			Reference
		
	
	
		
	
	
			lix-project/lix#1
			
		
	
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "%!s()"
	 
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Overlaying
nixVersions.stabledoes not propagate to NixOS tests/systems, hinting at nixpkgs reimportation happening somewhere in-between.Steps To Reproduce
@pennae could you provide a reproducer?
Expected behavior
It should pass the overlayed
nixVersions.stableto the systems.should fail, but does not. building
-A nixinstead fails as expectedCause identified:
nixos/nixpkgs@3794246066/nixos/modules/misc/nixpkgs.nix (L71-L94)Now, what to do about it, that is a much harder question to answer :(
I spot a TODO though, and I think it is exactly the right spot to do it:
nixos/nixpkgs@b8698cd8d6/nixos/lib/testing/pkgs.nix (L11-L13)I don't think there is a bug here (or in other words, I believe things are working as intended). The reason you don't get a build failure is because
nixosTests.miscdoesn't usenixat all. However, if you add the following change to./nixos/tests/misc.nix:Then the reproduction now fails in the way you expected
Gabriella: i think that is somewhat plausible as well but I've found via debugger that it is reimporting nixpkgs at some point due to a clear cut case of the testing framework not stopping that so even if the test is using nix, it might not pick up the overlayed version? Unsure how our results fit together.
My best guess is that reason for the reimport of Nixpkgs is this:
NixOS/nixpkgs@4f7fd6dded/pkgs/build-support/testers/default.nix (L126)The NixOS tests use
pkgsLinuxwhich (if you're on a non-Linux system) will reimport Nixpkgs but still with the same overlays as before just with a differentsystemargument:NixOS/nixpkgs@bc50837c0e/pkgs/top-level/stage.nix (L247-L255)If you're already on a Linux system then I'm not sure why the second reimport of Nixpkgs is happening, but either way my intuition here is that the second reimport of Nixpkgs is probably still reusing the same set of overlays as the original import of Nixpkgs.
huhhhh, that first module should surely be in there when running on Linux but is not working at least. weird.
This issue was mentioned on Gerrit on the following CLs:
Is this related to nixpkgs#55798 by chance? (see also nixpkgs#50301)
if we remember correctly that's what caused this problem in the first place, yes