mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib, fetchFromGitHub, buildGoModule, testers, oneshot }:
|
|
|
|
buildGoModule rec {
|
|
pname = "oneshot";
|
|
version = "2.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "forestnode-io";
|
|
repo = "oneshot";
|
|
rev = "v${version}";
|
|
hash = "sha256-eEVjdFHZyk2bSVqrMJIsgZvvLoDOira8zTzX9oDNtHM=";
|
|
};
|
|
|
|
vendorHash = "sha256-TktSQMIHYXF9eyY6jyfE31WLXEq7VZU3qnVIMGjMMcA=";
|
|
|
|
subPackages = [ "cmd" ];
|
|
|
|
env.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 = "First-come first-served single-fire HTTP server";
|
|
homepage = "https://www.oneshot.uno/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ milibopp ];
|
|
mainProgram = "oneshot";
|
|
};
|
|
}
|