mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
e8efc18c45
Diff: https://github.com/srl-labs/containerlab/compare/v0.44.2...v0.44.3 Changelog: https://github.com/srl-labs/containerlab/releases/tag/v0.44.3
47 lines
1.2 KiB
Nix
47 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "containerlab";
|
|
version = "0.44.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "srl-labs";
|
|
repo = "containerlab";
|
|
rev = "v${version}";
|
|
hash = "sha256-USQULAT1T40eyQHpU3YIdwl2PDG1IHm9ferXKsNVyLg=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
vendorHash = "sha256-yzxhK7Gpgcdh+j8EJvHIduZgsF1rK652QWvswFkgO7s=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X" "github.com/srl-labs/containerlab/cmd.version=${version}"
|
|
"-X" "github.com/srl-labs/containerlab/cmd.commit=${src.rev}"
|
|
"-X" "github.com/srl-labs/containerlab/cmd.date=1970-01-01T00:00:00Z"
|
|
];
|
|
|
|
postInstall = ''
|
|
local INSTALL="$out/bin/containerlab"
|
|
installShellCompletion --cmd containerlab \
|
|
--bash <($out/bin/containerlab completion bash) \
|
|
--fish <($out/bin/containerlab completion fish) \
|
|
--zsh <($out/bin/containerlab completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Container-based networking lab";
|
|
homepage = "https://containerlab.dev/";
|
|
changelog = "https://github.com/srl-labs/containerlab/releases/tag/${src.rev}";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ janik ];
|
|
};
|
|
}
|