boring: init at 0.11.4 (#413480)

This commit is contained in:
Aleksana 2025-06-09 23:24:20 +08:00 committed by GitHub
commit f5c9fe67fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,56 @@
{
boring,
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
testers,
}:
buildGoModule (finalAttrs: {
pname = "boring";
version = "0.11.4";
src = fetchFromGitHub {
owner = "alebeck";
repo = "boring";
tag = finalAttrs.version;
hash = "sha256-N0GVXtw6Gp6iHKBD2Lk6FX8XaUnkPgZduPaczYdApAs=";
};
nativeBuildInputs = [
installShellFiles
];
vendorHash = "sha256-j8A0F+o3EnzJdge+T/gHAwRGwzC86oD6ddZejUs/C7o=";
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";
};
})