depot/third_party/nixpkgs/pkgs/by-name/in/incus/client.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

45 lines
730 B
Nix

{
lts ? false,
meta,
patches,
src,
vendorHash,
version,
lib,
buildGoModule,
installShellFiles,
}:
let
pname = "incus${lib.optionalString lts "-lts"}-client";
in
buildGoModule {
inherit
patches
pname
src
vendorHash
version
;
CGO_ENABLED = 0;
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/incus" ];
postInstall = ''
installShellCompletion --cmd incus \
--bash <($out/bin/incus completion bash) \
--fish <($out/bin/incus completion fish) \
--zsh <($out/bin/incus completion zsh)
'';
# don't run the full incus test suite
doCheck = false;
meta = meta // {
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}