-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
There was a problem hiding this 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.
Oh I like that idea more, lemme try something.. |
Done, I like it more like this :D |
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.version; | |
version = (lib.importTOML ./Cargo.toml).package.version; |
default.nix
Outdated
# The build with all internal derivation attributes exposed | ||
buildUnredacted = pkgs.callPackage ./package.nix { | ||
inherit nixpkgsLibPath initNix runtimeExprPath testNixpkgsPath version; | ||
}; |
There was a problem hiding this comment.
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.
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
Nice suggestions, done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Tight and minimal.
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!)