Skip to content

godot: fix eval on Nix 2.3#390740

Merged
philiptaron merged 1 commit intoNixOS:masterfrom
philiptaron:nix-2.3-fixes
Mar 17, 2025
Merged

godot: fix eval on Nix 2.3#390740
philiptaron merged 1 commit intoNixOS:masterfrom
philiptaron:nix-2.3-fixes

Conversation

@philiptaron
Copy link
Contributor

@philiptaron philiptaron commented Mar 17, 2025

Fix evaluation on nixVersions.minimum (Nix 2.3) so that nixpkgs-vet is able to work on all versions of Nix that are supported in nixpkgs.

This was detected with nixpkgs-vet's automated update: NixOS/nixpkgs-vet#157

Before:

The error is:

while evaluating 'callPackage' at /build/nixpkgs-vetuXjxj1/eval.nix:17:11, called from /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/pkgs/top-level/all-packages.nix:3437:12:
while evaluating 'addVariantInfo' at /build/nixpkgs-vetuXjxj1/eval.nix:36:12, called from /build/nixpkgs-vetuXjxj1/eval.nix:18:7:
while evaluating 'callPackageWith' at /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/lib/customisation.nix:240:19, called from /build/nixpkgs-vetuXjxj1/eval.nix:18:23:
while evaluating 'filterAttrs' at /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/lib/attrsets.nix:646:5, called from /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/lib/customisation.nix:254:11:
while evaluating 'functionArgs' at /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/lib/trivial.nix:1018:18, called from /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/lib/customisation.nix:243:15:
syntax error, unexpected '/', expecting ID or OR_KW or DOLLAR_CURLY or '"', at /nix/store/mpj7y2ambvj9wf6p724kxzsynzz19v6h-source/pkgs/development/tools/godot/default.nix:10:23

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.

Copy link
Member

@Sigmanificient Sigmanificient left a comment

Choose a reason for hiding this comment

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

tested with nix-shell -p nix_2_3, it seems to indeed fix the build failure:

[nix-shell:~/nixpkgs]$ nix-build --version
nix-build (Nix) 2.3.18

[nix-shell:~/nixpkgs]$ nix-build -A godot
warning: unknown setting 'experimental-features'
warning: Nix search path entry 'nixpkgs' does not exist, ignoring
error: syntax error, unexpected '/', expecting ID or OR_KW or DOLLAR_CURLY or '"', at /home/sigmanificient/nixpkgs/pkgs/development/tools/godot/default.nix:10:23

[nix-shell:~/nixpkgs]$ git apply 390740.patch

[nix-shell:~/nixpkgs]$ nix-build -A godot
warning: unknown setting 'experimental-features'
warning: Nix search path entry 'nixpkgs' does not exist, ignoring
/nix/store/ahhwjx4md9spbg8mpfa06rbaqmki8gln-godot4-4.4-stable

[nix-shell:~/nixpkgs]$ 

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 17, 2025
@philiptaron philiptaron merged commit 7672dd7 into NixOS:master Mar 17, 2025
31 of 35 checks passed
@philiptaron philiptaron deleted the nix-2.3-fixes branch March 17, 2025 19:54
@Sigmanificient Sigmanificient added the 12.approvals: 2 This PR was reviewed and approved by two persons. label Mar 17, 2025
@Sigmanificient
Copy link
Member

That was fast!

@philiptaron
Copy link
Contributor Author

Thanks!

@infinisil
Copy link
Member

In a round-about way, kind of very neat how nixpkgs-vet CI found this!

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

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages 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