mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
commit
3c2f517c6e
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "xcaddy";
|
||||
version = "0.3.1";
|
||||
version = "0.3.2";
|
||||
|
||||
subPackages = [ "cmd/xcaddy" ];
|
||||
|
||||
@ -10,19 +10,26 @@ buildGoModule rec {
|
||||
owner = "caddyserver";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oGTtS5UlEebIqv4SM4q0YclASJNu8DNOLrGLRRAtkd8=";
|
||||
hash = "sha256-M0eMI/TtUNVqE4F1ifizVb0e4ACGa+yLkG3pJLaaDNs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./inject_version_info.diff
|
||||
./use_tmpdir_on_darwin.diff
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/caddyserver/xcaddy/cmd.customVersion=v${version}"
|
||||
];
|
||||
|
||||
vendorHash = "sha256-RpbnoXyTrqGOI7DpgkO+J47P17T4QCVvM1CfS6kRO9Y=";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/caddyserver/xcaddy";
|
||||
description = "Build Caddy with plugins";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ tjni ];
|
||||
maintainers = with maintainers; [ tjni indeednotjames ];
|
||||
};
|
||||
}
|
||||
|
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