Skip to content

lib/tests/test-with-nix: run misc.nix and fetchers.nix tests in the derivation#433729

Merged
emilazy merged 5 commits intoNixOS:masterfrom
xokdvium:lib-tests-nix
Aug 14, 2025
Merged

lib/tests/test-with-nix: run misc.nix and fetchers.nix tests in the derivation#433729
emilazy merged 5 commits intoNixOS:masterfrom
xokdvium:lib-tests-nix

Conversation

@xokdvium
Copy link
Contributor

This would have allowed us to catch to fromTOML regression in
1 without waiting for the dogfooding on master, since previously
these tests 2 were not run for the Nix/Lix under test - only the host
nix.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

This would have allowed us to catch to fromTOML regression in
[1] without waiting for the dogfooding on master, since previously
these tests [2] were not run for the Nix/Lix under test - only the host
nix.

[1]: NixOS/nix#13741
[2]: NixOS#433710
@xokdvium xokdvium requested review from a team and emilazy August 14, 2025 16:29
@nix-owners nix-owners bot requested review from hsjobeki and infinisil August 14, 2025 16:31
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: lib The Nixpkgs function library labels Aug 14, 2025
@xokdvium xokdvium changed the title lib/tests/test-with-nix: run misc.nix tests in the derivation lib/tests/test-with-nix: run misc.nix and fetchers.nix tests in the derivation Aug 14, 2025
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM – it seems like stuff was accidentally added outside of the derivation here as part of years of churn (e.g. #64563) – but maybe we should just drop check-eval.nix entirely.

This doesn't do the right thing here, because it evaluates
the test with nix that is evaluating the `nixpkgs-lib-tests-nix-${nix.version}`
derivation, not the Nix/Lix under test. This was just really busted for a long
time.
This suffers from the same issue as misc.nix tests, because they
were evaluated by the host nix, not the one that is being tested.
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 14, 2025
@xokdvium
Copy link
Contributor Author

xokdvium commented Aug 14, 2025

but maybe we should just drop check-eval.nix entirely.

I suppose it makes sense, since there are no other in-tree users of this. Dropped the file.

Copy link
Member

@lf- lf- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this has no effect on lix's out of tree usage and looks overall good to me.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 14, 2025
@emilazy
Copy link
Member

emilazy commented Aug 14, 2025

Let’s try it out. cc @wolfgangwalther since this is CI‐related.

@emilazy emilazy merged commit 47e013c into NixOS:master Aug 14, 2025
26 of 29 checks passed
@xokdvium xokdvium deleted the lib-tests-nix branch August 15, 2025 11:33
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Aug 18, 2025

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

Labels

6.topic: lib The Nixpkgs function library 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants