Merge pull request #250646 from aaronjheng/oneshot

oneshot: 1.5.1 -> 2.0.1
This commit is contained in:
OTABI Tomoya 2023-09-01 12:11:31 +09:00 committed by GitHub
commit 9d33ec8065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 10 deletions

View File

@ -1,26 +1,50 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, testers, oneshot }:
buildGoModule rec {
pname = "oneshot";
version = "1.5.1";
version = "2.0.1";
src = fetchFromGitHub {
owner = "raphaelreyna";
owner = "forestnode-io";
repo = "oneshot";
rev = "v${version}";
sha256 = "sha256-5NCGKgmioTOHGJEWMIEsZlA+072XXL9L8KbEH6+caHc=";
hash = "sha256-QReh8wdFeiCAv+XMz4cADNn9QcxlvewFJJuJ+OH7Lgc=";
};
vendorSha256 = "sha256-rL/NWIIggvngTrdTDm1g1uH3vC55JF3cWllPc6Yb5jc=";
vendorHash = "sha256-z6eOPugSwWEK02lgRu5Oo8LzjXnJlAtQvkzdevjBTVs=";
doCheck = false;
subPackages = [ "cmd" ];
subPackages = [ "." ];
GOWORK = "off";
modRoot = "v2";
ldflags = [
"-s"
"-w"
"-extldflags=-static"
"-X github.com/forestnode-io/oneshot/v2/pkg/version.Version=${version}"
"-X github.com/forestnode-io/oneshot/v2/pkg/version.APIVersion=v1.0.0"
];
installPhase = ''
runHook preInstall
install -D -m 555 -T $GOPATH/bin/cmd $out/bin/oneshot
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = oneshot;
command = "oneshot version";
};
meta = with lib; {
description = "A first-come-first-serve single-fire HTTP server";
homepage = "https://github.com/raphaelreyna/oneshot";
description = "A first-come first-served single-fire HTTP server";
homepage = "https://www.oneshot.uno/";
license = licenses.mit;
maintainers = with maintainers; [ milibopp ];
mainProgram = "oneshot";
};
}

View File

@ -6105,7 +6105,9 @@ with pkgs;
onboard = callPackage ../applications/misc/onboard { };
oneshot = callPackage ../tools/networking/oneshot { };
oneshot = callPackage ../tools/networking/oneshot {
buildGoModule = buildGo121Module;
};
orjail = callPackage ../tools/security/orjail { };