nixpkgs/pkgs/tools/networking/containerlab/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
920 B
Nix
Raw Normal View History

2023-05-28 14:41:26 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "containerlab";
2023-06-21 19:13:19 +00:00
version = "0.42.0";
2023-05-28 14:41:26 +00:00
src = fetchFromGitHub {
owner = "srl-labs";
repo = "containerlab";
rev = "v${version}";
2023-06-21 19:13:19 +00:00
hash = "sha256-Vs3+5lnHy1QOisyq8heHlkE+Ezd6jDTFiTZUPxNQDnA=";
2023-05-28 14:41:26 +00:00
};
2023-06-21 19:13:19 +00:00
vendorHash = "sha256-QaL4dlGw0az/hnYK20UOgh+AZ4wjhaopesJeN4zmeFE=";
2023-05-28 14:41:26 +00:00
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"
];
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 ];
};
}