nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ buildGoModule, fetchFromGitHub, stdenv, lib }:
2
3buildGoModule rec {
4 pname = "fly";
5 version = "7.6.0";
6
7 src = fetchFromGitHub {
8 owner = "concourse";
9 repo = "concourse";
10 rev = "v${version}";
11 sha256 = "sha256-Zi+gyO+2AKDgcfgYrzLskJYZ6hQKOVlOL7Y9nxH/pGg=";
12 };
13
14 vendorSha256 = "sha256-OF3parnlTPmcr7tVcc6495sUMRApSpBHHjSE/4EFIxE=";
15
16 doCheck = false;
17
18 subPackages = [ "fly" ];
19
20 ldflags = [
21 "-X github.com/concourse/concourse.Version=${version}"
22 ];
23
24 postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
25 mkdir -p $out/share/{bash-completion/completions,zsh/site-functions}
26 $out/bin/fly completion --shell bash > $out/share/bash-completion/completions/fly
27 $out/bin/fly completion --shell zsh > $out/share/zsh/site-functions/_fly
28 '';
29
30 meta = with lib; {
31 description = "A command line interface to Concourse CI";
32 homepage = "https://concourse-ci.org";
33 license = licenses.asl20;
34 maintainers = with maintainers; [ ivanbrennan ];
35 };
36}