mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
fly: init at 5.3.0
Add `fly` CLI for working with Concourse CI, and include Bash completions.
This commit is contained in:
parent
5851594937
commit
9e465d2f60
@ -0,0 +1,37 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib, writeText }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "fly";
|
||||
version = "5.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "concourse";
|
||||
repo = "concourse";
|
||||
rev = "v${version}";
|
||||
sha256 = "06ns98k47nafhkkj7gkmxp7msn4ssypyss6ll0fm6380vq2cavnj";
|
||||
};
|
||||
|
||||
modSha256 = "11rnlmn5hp9nsgkmd716dsjmkr273035j9gzfhjxjsfpiax60i0a";
|
||||
|
||||
subPackages = [ "fly" ];
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X github.com/concourse/concourse.Version=${version}
|
||||
'';
|
||||
|
||||
# The fly.bash file included with this derivation can be replaced by a
|
||||
# call to `fly completion bash` once the `completion` subcommand has
|
||||
# made it into a release. Similarly, `fly completion zsh` will provide
|
||||
# zsh completions. https://github.com/concourse/concourse/pull/4012
|
||||
postInstall = ''
|
||||
install -D -m 444 ${./fly.bash} $out/share/bash-completion/completions/fly
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command line interface to Concourse CI";
|
||||
homepage = https://concourse-ci.org;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ivanbrennan ];
|
||||
};
|
||||
}
|
10
pkgs/development/tools/continuous-integration/fly/fly.bash
Normal file
10
pkgs/development/tools/continuous-integration/fly/fly.bash
Normal file
@ -0,0 +1,10 @@
|
||||
# credits:
|
||||
# https://godoc.org/github.com/jessevdk/go-flags#hdr-Completion
|
||||
# https://github.com/concourse/concourse/issues/1309#issuecomment-452893900
|
||||
_fly_compl() {
|
||||
args=("${COMP_WORDS[@]:1:$COMP_CWORD}")
|
||||
local IFS=$'\n'
|
||||
COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}"))
|
||||
return 0
|
||||
}
|
||||
complete -F _fly_compl fly
|
@ -9244,6 +9244,8 @@ in
|
||||
inherit (darwin) cf-private;
|
||||
};
|
||||
|
||||
fly = callPackage ../development/tools/continuous-integration/fly { };
|
||||
|
||||
foreman = callPackage ../tools/system/foreman { };
|
||||
goreman = callPackage ../tools/system/goreman { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user