chore: re-add nix stuff from @waalge

Co-authored-by: waalge
This commit is contained in:
rvcas
2023-06-07 17:16:56 -04:00
parent 8d107b1293
commit 41a08e4a06
3 changed files with 14 additions and 2 deletions

View File

@@ -63,9 +63,12 @@ fn main() -> miette::Result<()> {
}
fn version() -> String {
use std::env;
let nix_git_rev = env::var("GIT_REVISION").unwrap_or("unknown".to_string());
format!(
"v{} {}",
built_info::PKG_VERSION,
built_info::GIT_COMMIT_HASH_SHORT.unwrap_or("unknown")
built_info::GIT_COMMIT_HASH_SHORT.unwrap_or(&nix_git_rev)
)
}