nixpkgs/pkgs/by-name/go/gopher64/no-git-describe.patch
Sizhe Zhao 49cf621495 gopher64: 1.0.17 -> 1.1.20
(cherry picked from commit 229d459e14)
2026-06-21 15:37:51 +00:00

29 lines
976 B
Diff

--- a/build.rs
+++ b/build.rs
@@ -278,26 +278,6 @@
.compile("simd");
}
- let mut git_output = std::process::Command::new("git");
- git_output.args(["describe", "--dirty"]);
-
- let git_describe = if let Ok(git_output) = git_output.output()
- && git_output.status.success()
- {
- String::from_utf8(git_output.stdout).unwrap()
- } else if let Ok(git_output) = git_output.args(["--always"]).output()
- && git_output.status.success()
- {
- format!(
- "v{}-{}",
- env!("CARGO_PKG_VERSION"),
- String::from_utf8(git_output.stdout).unwrap()
- )
- } else {
- panic!("Failed to get git describe");
- };
- println!("cargo:rustc-env=GIT_DESCRIBE={git_describe}");
-
println!("cargo:rerun-if-env-changed=NETPLAY_ID");
let netplay_id = std::env::var("NETPLAY_ID").unwrap_or("gopher64".to_string());
println!("cargo:rustc-env=NETPLAY_ID={netplay_id}");