mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 13:08:39 +03:00
xcaddy: fix build info
This commit is contained in:
parent
ed903ee4ef
commit
897bc4daab
@ -14,9 +14,16 @@ buildGoModule rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
./inject_version_info.diff
|
||||||
./use_tmpdir_on_darwin.diff
|
./use_tmpdir_on_darwin.diff
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X github.com/caddyserver/xcaddy/cmd.customVersion=v${version}"
|
||||||
|
];
|
||||||
|
|
||||||
vendorHash = "sha256-RpbnoXyTrqGOI7DpgkO+J47P17T4QCVvM1CfS6kRO9Y=";
|
vendorHash = "sha256-RpbnoXyTrqGOI7DpgkO+J47P17T4QCVvM1CfS6kRO9Y=";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
16
pkgs/servers/caddy/xcaddy/inject_version_info.diff
Normal file
16
pkgs/servers/caddy/xcaddy/inject_version_info.diff
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/cmd/main.go b/cmd/main.go
|
||||||
|
index ede7cd8..c553140 100644
|
||||||
|
--- a/cmd/main.go
|
||||||
|
+++ b/cmd/main.go
|
||||||
|
@@ -401,8 +401,11 @@ func splitWith(arg string) (module, version, replace string, err error) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
+var customVersion string
|
||||||
|
+
|
||||||
|
// xcaddyVersion returns a detailed version string, if available.
|
||||||
|
func xcaddyVersion() string {
|
||||||
|
+ return customVersion
|
||||||
|
mod := goModule()
|
||||||
|
ver := mod.Version
|
||||||
|
if mod.Sum != "" {
|
Loading…
Reference in New Issue
Block a user