Compare commits

..

3 Commits

Author SHA1 Message Date
waalge 15a43d1a87 fix rust version 2023-09-27 22:25:55 +00:00
waalge cf7020c528 shortRev 2023-09-27 21:27:55 +00:00
waalge 873b39169e rev 2023-09-27 21:03:47 +00:00
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,4 @@
use clap::Parser;
use std::env;
pub mod blueprint;
pub mod build;
@ -57,7 +56,6 @@ fn version() -> String {
format!(
"v{} {}",
built_info::PKG_VERSION,
built_info::GIT_COMMIT_HASH_SHORT
.unwrap_or(&env::var("GIT_COMMIT_HASH_SHORT").unwrap_or("unknown".to_string()))
built_info::GIT_COMMIT_HASH_SHORT.unwrap_or("unknown")
)
}

View File

@ -31,10 +31,12 @@
src = pkgs.lib.cleanSourceWith { src = self; };
cargoLock.lockFile = ./Cargo.lock;
GIT_COMMIT_HASH_SHORT = self.rev or "dirty"; # or self.dirtyRev;
GIT_COMMIT_HASH_SHORT = self.shortRev or "dirty"; # or self.dirtyRev;
postPatch = ''
substituteInPlace crates/aiken/src/cmd/mod.rs --replace "built_info::GIT_COMMIT_HASH_SHORT" "\"$GIT_COMMIT_HASH_SHORT\""
substituteInPlace crates/aiken/src/cmd/mod.rs \
--replace "built_info::GIT_COMMIT_HASH_SHORT" \
"Some(\"$GIT_COMMIT_HASH_SHORT\")"
'';
postInstall = ''