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
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
stdenv,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "pathvector";
|
|
version = "6.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "natesales";
|
|
repo = "pathvector";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-TqGasguEAcA5ET2E/uFjgIl7IHI2v9m5EaXpIMG3T8c=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
vendorHash = "sha256-hgUuntT6jMWI14qDE3Yjm5W8UqQ6CcvoILmSDaVEZac=";
|
|
|
|
env.CGO_ENABLED = 0;
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
"-X main.commit=${src.rev}"
|
|
"-X main.date=unknown"
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
local INSTALL="$out/bin/pathvector"
|
|
installShellCompletion --cmd pathvector \
|
|
--bash <($out/bin/pathvector completion bash) \
|
|
--fish <($out/bin/pathvector completion fish) \
|
|
--zsh <($out/bin/pathvector completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Declarative edge routing platform that automates route optimization and control plane configuration";
|
|
homepage = "https://pathvector.io";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ matthewpi ];
|
|
mainProgram = "pathvector";
|
|
};
|
|
}
|