btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / fl / fly / package.nix
blob792e71dd7fb8f4304a8bf320a19c81f2c7ac5063
1 { buildGoModule, fetchFromGitHub, stdenv, lib, installShellFiles }:
3 buildGoModule rec {
4   pname = "fly";
5   version = "7.12.0";
7   src = fetchFromGitHub {
8     owner = "concourse";
9     repo = "concourse";
10     rev = "v${version}";
11     hash = "sha256-lAx9TZVRkPMa5swB74zI0xJ7pbRDApZoens747XcuJk=";
12   };
14   vendorHash = "sha256-dXjee2rZn1lVEmL8Cy8rrdpSX1OpS9GHKZo53ur3kew=";
16   subPackages = [ "fly" ];
18   ldflags = [
19     "-s" "-w" "-X github.com/concourse/concourse.Version=${version}"
20   ];
22   nativeBuildInputs = [ installShellFiles ];
24   doCheck = false;
26   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
27     installShellCompletion --cmd fly \
28       --bash <($out/bin/fly completion --shell bash) \
29       --fish <($out/bin/fly completion --shell fish) \
30       --zsh <($out/bin/fly completion --shell zsh)
31   '';
33   meta = with lib; {
34     description = "Command line interface to Concourse CI";
35     mainProgram = "fly";
36     homepage = "https://concourse-ci.org";
37     license = licenses.asl20;
38     maintainers = with maintainers; [ ivanbrennan SuperSandro2000 ];
39   };