2020-05-15 13:47:00 +02:00
|
|
|
{ buildGoModule, fetchFromGitHub, stdenv, lib, writeText }:
|
2019-07-14 00:55:22 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fly";
|
2020-05-15 13:51:31 +02:00
|
|
|
version = "6.1.0";
|
2019-07-14 00:55:22 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "concourse";
|
|
|
|
repo = "concourse";
|
|
|
|
rev = "v${version}";
|
2020-05-15 13:51:31 +02:00
|
|
|
sha256 = "14sm3xwhm6pfln18i9f9dyj7s2wcri43rxj4s1cja7nwqr5sqb3x";
|
2019-07-14 00:55:22 +02:00
|
|
|
};
|
|
|
|
|
2020-05-15 13:51:31 +02:00
|
|
|
vendorSha256 = "1c099sn5rrvj805va1lyjlbv7i2g1z5bxyaisv5l9365z0lv1cwm";
|
2019-07-14 00:55:22 +02:00
|
|
|
|
|
|
|
subPackages = [ "fly" ];
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X github.com/concourse/concourse.Version=${version}
|
|
|
|
'';
|
|
|
|
|
2020-05-15 13:47:00 +02:00
|
|
|
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
|
2019-07-14 00:55:22 +02:00
|
|
|
'';
|
|
|
|
|
2020-03-27 08:33:21 +01:00
|
|
|
meta = with lib; {
|
2019-07-14 00:55:22 +02:00
|
|
|
description = "A command line interface to Concourse CI";
|
2020-03-14 18:32:06 +01:00
|
|
|
homepage = "https://concourse-ci.org";
|
2019-07-14 00:55:22 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ivanbrennan ];
|
|
|
|
};
|
2020-05-15 13:51:31 +02:00
|
|
|
}
|