From 46c3bc73957c72c1a567fb84a1887a1e96d8f444 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Sun, 27 Aug 2023 12:42:31 +0300 Subject: [PATCH] pufferpanel: 2.6.7 -> 2.6.9 --- pkgs/servers/pufferpanel/default.nix | 53 +++++++++++++++------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/pkgs/servers/pufferpanel/default.nix b/pkgs/servers/pufferpanel/default.nix index d3420f90db54..2f56068df252 100644 --- a/pkgs/servers/pufferpanel/default.nix +++ b/pkgs/servers/pufferpanel/default.nix @@ -1,41 +1,40 @@ { lib , fetchFromGitHub -, fetchpatch -, applyPatches , buildGoModule , buildNpmPackage , makeWrapper , go-swag , nixosTests +, testers +, pufferpanel }: buildGoModule rec { pname = "pufferpanel"; - version = "2.6.7"; + version = "2.6.9"; - src = applyPatches { - src = fetchFromGitHub { - owner = "PufferPanel"; - repo = "PufferPanel"; - rev = "v${version}"; - hash = "sha256-ay9NNcK+6QFobe/rwtZF8USl0vMbDZBg5z57fjA5VLw="; - }; - patches = [ - # Bump sha1cd package, otherwise i686-linux fails to build. - ./bump-sha1cd.patch - - # Seems to be an anti-feature. Startup is the only place where user/group is - # hardcoded and checked. - # - # There is no technical reason PufferPanel cannot run as a different user, - # especially for simple commands like `pufferpanel version`. - ./disable-group-checks.patch - - # Some tests do not have network requests stubbed :( - ./skip-network-tests.patch - ]; + src = fetchFromGitHub { + owner = "PufferPanel"; + repo = "PufferPanel"; + rev = "v${version}"; + hash = "sha256-+ZZUoqCiSbrkaeYrm9X8SuX0INsGFegQNwa3WjBvgHQ="; }; + patches = [ + # Bump sha1cd package, otherwise i686-linux fails to build. + ./bump-sha1cd.patch + + # Seems to be an anti-feature. Startup is the only place where user/group is + # hardcoded and checked. + # + # There is no technical reason PufferPanel cannot run as a different user, + # especially for simple commands like `pufferpanel version`. + ./disable-group-checks.patch + + # Some tests do not have network requests stubbed :( + ./skip-network-tests.patch + ]; + ldflags = [ "-s" "-w" @@ -58,7 +57,7 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper go-swag ]; - vendorHash = "sha256-Esfk7SvqiWeiobXSI+4wYVEH9yVkB+rO7bxUQ5TzvG4="; + vendorHash = "sha256-402ND99FpU+zNV1e5Th1+aZKok49cIEdpPPLLfNyL3E="; proxyVendor = true; # Generate code for Swagger documentation endpoints (see web/swagger/docs.go). @@ -91,6 +90,10 @@ buildGoModule rec { passthru.tests = { inherit (nixosTests) pufferpanel; + version = testers.testVersion { + package = pufferpanel; + command = "${pname} version"; + }; }; meta = with lib; {