Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 installShellFiles, 7}: 8 9buildGoModule rec { 10 pname = "tscli"; 11 version = "0.0.15"; 12 13 src = fetchFromGitHub { 14 owner = "jaxxstorm"; 15 repo = "tscli"; 16 tag = "v${version}"; 17 hash = "sha256-RsWpZYRb/6ZpOio5te7qokGJeTlSmu/MH+BVoQVbkNw="; 18 }; 19 20 vendorHash = "sha256-RELJJN2ldcUkbyskitg1y6vakdQ6mRkmT7Y25TS2sz8="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 ldflags = [ 25 "-X=github.com/jaxxstorm/tscli/pkg/version.Version=${version}" 26 ]; 27 28 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 29 installShellCompletion --cmd tscli \ 30 --bash <($out/bin/tscli -k XXX completion bash) \ 31 --fish <($out/bin/tscli -k XXX completion fish) \ 32 --zsh <($out/bin/tscli -k XXX completion zsh) 33 ''; 34 35 meta = { 36 description = "CLI tool to interact with the Tailscale API"; 37 homepage = "https://github.com/jaxxstorm/tscli"; 38 changelog = "https://github.com/jaxxstorm/tscli/releases/tag/${src.tag}/CHANGELOG.md"; 39 mainProgram = "tscli"; 40 license = lib.licenses.mit; 41 maintainers = with lib.maintainers; [ philiptaron ]; 42 }; 43}