allow supplying custom version extra info in nix

This commit is contained in:
Charles Hall 2025-03-02 10:57:13 -08:00
parent e11e27bc0c
commit 114e7ba577
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -15,6 +15,9 @@
, all-features ? false
, features ? []
, profile ? "release"
, version-extra ? inputs.self.shortRev
or inputs.self.dirtyShortRev
or null,
}:
let
@ -58,13 +61,8 @@ let
});
buildPackageEnv =
let
GRAPEVINE_VERSION_EXTRA = inputs.self.shortRev
or inputs.self.dirtyShortRev
or null;
in
(lib.optionalAttrs (GRAPEVINE_VERSION_EXTRA != null) {
inherit GRAPEVINE_VERSION_EXTRA;
(lib.optionalAttrs (version-extra != null) {
GRAPEVINE_VERSION_EXTRA = version-extra;
})
// buildDepsOnlyEnv;