Merge pull request #251756 from tie/update-pufferpanel

pufferpanel: 2.6.7 -> 2.6.9
This commit is contained in:
Weijia Wang 2023-09-06 00:12:37 +02:00 committed by GitHub
commit 6810843def
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {