Merge pull request #405 from samhug/fix-nix-version

update nix build to pull version from Cargo.toml
This commit is contained in:
koverstreet 2025-09-12 00:43:09 -04:00 committed by GitHub
commit 051728a032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,10 +77,7 @@
rustfmtToml = builtins.fromTOML (builtins.readFile ./rustfmt.toml);
rev = self.shortRev or self.dirtyShortRev or (substring 0 8 self.lastModifiedDate);
makefileVersion = removePrefix "VERSION=" (
findFirst (line: hasPrefix "VERSION=" line) "VERSION=0.0.0" (split "\n" (readFile ./Makefile))
);
version = "${makefileVersion}+${rev}";
version = "${cargoToml.package.version}+${rev}";
mkCommon =
{