diff --git a/pkgs/servers/headscale/default.nix b/pkgs/servers/headscale/default.nix index ad52bb94e89e..4d3b1921f9ae 100644 --- a/pkgs/servers/headscale/default.nix +++ b/pkgs/servers/headscale/default.nix @@ -7,33 +7,22 @@ }: buildGoModule rec { pname = "headscale"; - version = "0.22.3"; + version = "0.23.0"; src = fetchFromGitHub { owner = "juanfont"; repo = "headscale"; rev = "v${version}"; - hash = "sha256-nqmTqe3F3Oh8rnJH0clwACD/0RpqmfOMXNubr3C8rEc="; + hash = "sha256-5tlnVNpn+hJayxHjTpbOO3kRInOYOFz0pe9pwjXZlBE="; }; - vendorHash = "sha256-IOkbbFtE6+tNKnglE/8ZuNxhPSnloqM2sLgTvagMmnc="; - - patches = [ - # backport of https://github.com/juanfont/headscale/pull/1697 - ./trim-oidc-secret-path.patch - - # fix for headscale not reacting to SIGTERM - # see https://github.com/juanfont/headscale/pull/1480 and https://github.com/juanfont/headscale/issues/1461 - ./sigterm-fix.patch - ]; + vendorHash = "sha256-+8dOxPG/Q+wuHgRwwWqdphHOuop0W9dVyClyQuh7aRc="; ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"]; nativeBuildInputs = [installShellFiles]; checkFlags = ["-short"]; - tags = ["ts2019"]; - postInstall = '' installShellCompletion --cmd headscale \ --bash <($out/bin/headscale completion bash) \ @@ -41,7 +30,7 @@ buildGoModule rec { --zsh <($out/bin/headscale completion zsh) ''; - passthru.tests = { inherit (nixosTests) headscale; }; + passthru.tests = {inherit (nixosTests) headscale;}; meta = with lib; { homepage = "https://github.com/juanfont/headscale"; @@ -63,6 +52,7 @@ buildGoModule rec { Headscale implements this coordination server. ''; license = licenses.bsd3; + mainProgram = "headscale"; maintainers = with maintainers; [nkje jk kradalby misterio77 ghuntley]; }; } diff --git a/pkgs/servers/headscale/sigterm-fix.patch b/pkgs/servers/headscale/sigterm-fix.patch deleted file mode 100644 index 22a97d98caac..000000000000 --- a/pkgs/servers/headscale/sigterm-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/hscontrol/app.go b/hscontrol/app.go -index b8dceba..4bcf019 100644 ---- a/hscontrol/app.go -+++ b/hscontrol/app.go -@@ -821,6 +821,7 @@ func (h *Headscale) Serve() error { - - // And we're done: - cancel() -+ return - } - } - } diff --git a/pkgs/servers/headscale/trim-oidc-secret-path.patch b/pkgs/servers/headscale/trim-oidc-secret-path.patch deleted file mode 100644 index 4275988aa7db..000000000000 --- a/pkgs/servers/headscale/trim-oidc-secret-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/hscontrol/config.go b/hscontrol/config.go -index 0e83a1c..71fbfb0 100644 ---- a/hscontrol/config.go -+++ b/hscontrol/config.go -@@ -573,7 +573,7 @@ func GetHeadscaleConfig() (*Config, error) { - if err != nil { - return nil, err - } -- oidcClientSecret = string(secretBytes) -+ oidcClientSecret = strings.TrimSpace(string(secretBytes)) - } - - return &Config{ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 207b82ffe11f..2f123053890e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8498,7 +8498,9 @@ with pkgs; heimdall-gui = heimdall.override { enableGUI = true; }; - headscale = callPackage ../servers/headscale { }; + headscale = callPackage ../servers/headscale { + buildGoModule = buildGo123Module; + }; health = callPackage ../applications/misc/health { };