Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{
|
|
boring,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
stdenv,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "boring";
|
|
version = "0.11.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alebeck";
|
|
repo = "boring";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-RXLFIOGJEvE6kV14+rnN4zPV8bloikxjksdlSHQFwUU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
vendorHash = "sha256-/MAkVesn8ub2MrguWTueMI9+/lgCRdaXUEioHE/bg8w=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${finalAttrs.version}"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd boring \
|
|
--bash <($out/bin/boring --shell bash) \
|
|
--fish <($out/bin/boring --shell fish) \
|
|
--zsh <($out/bin/boring --shell zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = boring;
|
|
command = "boring version";
|
|
version = "boring ${finalAttrs.version}";
|
|
};
|
|
|
|
meta = {
|
|
description = "SSH tunnel manager";
|
|
homepage = "https://github.com/alebeck/boring";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
jacobkoziej
|
|
];
|
|
mainProgram = "boring";
|
|
};
|
|
})
|