Skip to content
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

Explicitly expose version to avoid release script failure #41

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

infinisil
Copy link
Member

lazyDerivation limits which attributes are exposed, and version is not currently one of them, so we need to explicitly expose it.

This fixes this CD failure:

https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8637321506/job/23679230914

This was accidentally introduced in #40 (should've made a separate PR for the first commit after all!)

@infinisil infinisil requested a review from a team as a code owner April 10, 2024 20:40
Copy link
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.

Sure, definitely one way to do it. Note the other set of things being returned at the end of the file. I sort of assumed that's where you'd land the version.

@infinisil
Copy link
Member Author

Oh I like that idea more, lemme try something..

@infinisil infinisil marked this pull request as draft April 10, 2024 20:46
@infinisil infinisil marked this pull request as ready for review April 10, 2024 20:49
@infinisil
Copy link
Member Author

Done, I like it more like this :D

Copy link
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.

More stuff to implement if you want.

default.nix Outdated
@@ -31,15 +31,18 @@ let
nix-store --init
'';

# Determine version from Cargo.toml
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version;
version = (lib.importTOML ./Cargo.toml).package.version;

default.nix Outdated
Comment on lines 37 to 40
# The build with all internal derivation attributes exposed
buildUnredacted = pkgs.callPackage ./package.nix {
inherit nixpkgsLibPath initNix runtimeExprPath testNixpkgsPath version;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd just leave this in lazyDerivation now that it isn't used elsewhere.

default.nix Show resolved Hide resolved
lazyDerivation limits which attributes are exposed, and version is not currently one of them,
so we need to explicitly expose it.

This fixes this CD failure:

https://github.com/NixOS/nixpkgs-check-by-name/actions/runs/8637321506/job/23679230914
@infinisil
Copy link
Member Author

Nice suggestions, done!

Copy link
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.

🚀

Tight and minimal.

@philiptaron philiptaron merged commit 90d32e5 into main Apr 10, 2024
2 checks passed
@philiptaron philiptaron deleted the fix-version branch April 10, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants