about summary refs log tree commit diff
path: root/pkgs/servers/pufferpanel
diff options
context:
space:
mode:
authorIvan Trubach <mr.trubach@icloud.com>2023-08-27 12:42:31 +0300
committerIvan Trubach <mr.trubach@icloud.com>2023-08-27 13:22:26 +0300
commit46c3bc73957c72c1a567fb84a1887a1e96d8f444 (patch)
tree466d46ebd1f0d755c2fb4d1b19d0658dd982ad1d /pkgs/servers/pufferpanel
parent9bb49e499fc2e3113fd9c5f418c99cbf86ebd599 (diff)
pufferpanel: 2.6.7 -> 2.6.9
Diffstat (limited to 'pkgs/servers/pufferpanel')
-rw-r--r--pkgs/servers/pufferpanel/default.nix55
1 files changed, 29 insertions, 26 deletions
diff --git a/pkgs/servers/pufferpanel/default.nix b/pkgs/servers/pufferpanel/default.nix
index d3420f90db543..2f56068df2521 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";
-
-  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
-    ];
+  version = "2.6.9";
+
+  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; {