depot/third_party/nixpkgs/pkgs/development/tools/continuous-integration/fly/default.nix

36 lines
1 KiB
Nix
Raw Normal View History

{ buildGoModule, fetchFromGitHub, stdenv, lib, writeText }:
buildGoModule rec {
pname = "fly";
version = "6.3.0";
src = fetchFromGitHub {
owner = "concourse";
repo = "concourse";
rev = "v${version}";
sha256 = "006qkg661hzbc2gpcnpxm09bp1kbb98y0bgdr49bjlnapcmdgr1b";
};
vendorSha256 = "03az7l9rf2syw837zliny82xhkqlad16z0vfcg5h21m3bhz6v6jy";
subPackages = [ "fly" ];
buildFlagsArray = ''
-ldflags=
-X github.com/concourse/concourse.Version=${version}
'';
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p $out/share/{bash-completion/completions,zsh/site-functions}
$out/bin/fly completion --shell bash > $out/share/bash-completion/completions/fly
$out/bin/fly completion --shell zsh > $out/share/zsh/site-functions/_fly
'';
meta = with lib; {
description = "A command line interface to Concourse CI";
homepage = "https://concourse-ci.org";
license = licenses.asl20;
maintainers = with maintainers; [ ivanbrennan ];
};
}