redlib: embed Git hash
This commit is contained in:
parent
444e7048f9
commit
e08e916cbc
@ -22,6 +22,9 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
patches = [
|
||||
# this is so the commit hash can be embedded so redlib doesn't complain
|
||||
# about the server being outdated unless it's /actually/ outdated
|
||||
./no-hash.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-ZmIYTDfdMDkxT1doV5kMMjqIHQ/zhiY/ewd77RqRSMU=";
|
||||
@ -63,6 +66,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
env = {
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
GIT_HASH=src.rev;
|
||||
};
|
||||
|
||||
passthru.tests = {
|
||||
|
10
pkgs/redlib/no-hash.patch
Normal file
10
pkgs/redlib/no-hash.patch
Normal file
@ -0,0 +1,10 @@
|
||||
diff --git a/build.rs b/build.rs
|
||||
index 0bdbda0..869c7e6 100644
|
||||
--- a/build.rs
|
||||
+++ b/build.rs
|
||||
@@ -21,5 +21,4 @@ fn main() {
|
||||
)
|
||||
.unwrap_or_default();
|
||||
let git_hash = if output == String::default() { "dev".into() } else { output };
|
||||
- println!("cargo:rustc-env=GIT_HASH={git_hash}");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user