1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/tools/networking/oneshot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-22 02:31:03 +01:00
{ lib, fetchFromGitHub, buildGoModule, testers, oneshot }:
2020-07-09 15:27:23 +01:00
buildGoModule rec {
pname = "oneshot";
2023-08-22 02:31:03 +01:00
version = "2.0.1";
2020-07-09 15:27:23 +01:00
src = fetchFromGitHub {
2023-08-22 02:31:03 +01:00
owner = "forestnode-io";
2020-07-09 15:27:23 +01:00
repo = "oneshot";
rev = "v${version}";
2023-08-22 02:31:03 +01:00
hash = "sha256-QReh8wdFeiCAv+XMz4cADNn9QcxlvewFJJuJ+OH7Lgc=";
2020-07-09 15:27:23 +01:00
};
2023-08-22 02:31:03 +01:00
vendorHash = "sha256-z6eOPugSwWEK02lgRu5Oo8LzjXnJlAtQvkzdevjBTVs=";
2020-07-09 15:27:23 +01:00
2023-08-22 02:31:03 +01:00
subPackages = [ "cmd" ];
2023-08-22 02:31:03 +01:00
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";
};
2020-07-09 15:27:23 +01:00
meta = with lib; {
2023-08-22 02:31:03 +01:00
description = "A first-come first-served single-fire HTTP server";
homepage = "https://www.oneshot.uno/";
2020-07-09 15:27:23 +01:00
license = licenses.mit;
2022-01-04 12:29:54 +00:00
maintainers = with maintainers; [ milibopp ];
2023-08-22 02:31:03 +01:00
mainProgram = "oneshot";
2020-07-09 15:27:23 +01:00
};
}