Skip to content

replaceVarsWith: fix checkPhase with dir set#365347

Merged
philiptaron merged 2 commits intoNixOS:stagingfrom
wolfgangwalther:replace-vars-with-dir
Dec 16, 2024
Merged

replaceVarsWith: fix checkPhase with dir set#365347
philiptaron merged 2 commits intoNixOS:stagingfrom
wolfgangwalther:replace-vars-with-dir

Conversation

@wolfgangwalther
Copy link
Copy Markdown
Contributor

The newly introduced replaceVarsWith didn't run the checkPhase properly when dir was set. Extended the test-suite to cover those cases, too.

Also move all the remaining cases of "substituteAll + isExecutable" to replaceVarsWith.

Working towards #237216.

CC @philiptaron

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: dotnet Language: .NET labels Dec 15, 2024
@nix-owners nix-owners Bot requested review from corngood and philiptaron December 15, 2024 12:23
This covers cases which need to use replaceVarsWith because the use
isExecutable = true.
Copy link
Copy Markdown
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

I do wonder whether the inherit (stdenv) shell uses meant to be runtimeShell, but let's keep them as-is.

Comment thread nixos/modules/system/boot/stage-2.nix
@philiptaron
Copy link
Copy Markdown
Contributor

I'm going to do a build of stdenv and run the tests then I intend to merge.

@ofborg ofborg Bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Dec 15, 2024
@philiptaron philiptaron merged commit 8f78cb0 into NixOS:staging Dec 16, 2024
@wolfgangwalther wolfgangwalther deleted the replace-vars-with-dir branch December 16, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: dotnet Language: .NET 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up This PR removes packages or removes other cruft 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants