Unverified Commit 9d33ec80 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #250646 from aaronjheng/oneshot

oneshot: 1.5.1 -> 2.0.1
parents 130e8052 6c2f7bcf
Loading
Loading
Loading
Loading
+33 −9
Original line number Diff line number Diff line
{ 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";
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -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 { };