2024-08-19 12:57:27 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
installShellFiles,
|
2023-05-28 20:10:26 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "labctl";
|
2024-08-19 12:57:27 +00:00
|
|
|
version = "0.0.22-unstable-2024-05-10";
|
2023-05-28 20:10:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "labctl";
|
|
|
|
repo = "labctl";
|
2024-08-19 12:57:27 +00:00
|
|
|
rev = "1a8b11402def10819d36b9f7f44e82612ef22674";
|
|
|
|
hash = "sha256-px5jrfllo6teJaNrqIQVyqMwArCw625xSVM7V/xW/IA=";
|
2023-05-28 20:10:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-03-10 22:33:54 +00:00
|
|
|
vendorHash = "sha256-Ycr/IZckIFysS9Goes58hhgh96UMRHjYWfWlQU23mXk=";
|
2023-05-28 20:10:26 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-X=github.com/labctl/labctl/app.version=${version}"
|
|
|
|
"-X=github.com/labctl/labctl/app.commit=${src.rev}"
|
|
|
|
"-X=github.com/labctl/labctl/app.date=1970-01-01T00:00:00Z"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
local INSTALL="$out/bin/labctl"
|
|
|
|
installShellCompletion --cmd labctl \
|
|
|
|
--bash <(echo "complete -C $INSTALL labctl") \
|
|
|
|
--zsh <(echo "complete -o nospace -C $INSTALL labctl")
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "collection of helper tools for network engineers, while configuring and experimenting with their own network labs";
|
|
|
|
homepage = "https://labctl.net";
|
2024-10-04 19:35:12 +00:00
|
|
|
changelog = "https://github.com/labctl/labctl/releases";
|
2023-05-28 20:10:26 +00:00
|
|
|
license = licenses.asl20;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "labctl";
|
2023-05-28 20:10:26 +00:00
|
|
|
};
|
|
|
|
}
|