nixpkgs/pkgs/development/tools/doctl/default.nix
Austin Seipp 700cc56a0e
doctl: 1.18.0 -> 1.31.2
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-09-13 18:32:29 -05:00

35 lines
956 B
Nix

{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "doctl";
version = "${major}.${minor}.${patch}";
major = "1";
minor = "31";
patch = "2";
goPackagePath = "github.com/digitalocean/doctl";
excludedPackages = ''\(doctl-gen-doc\|install-doctl\|release-doctl\)'';
buildFlagsArray = let t = goPackagePath; in ''
-ldflags=
-X ${t}.Major=${major}
-X ${t}.Minor=${minor}
-X ${t}.Patch=${patch}
-X ${t}.Label=release
'';
src = fetchFromGitHub {
owner = "digitalocean";
repo = "doctl";
rev = "v${version}";
sha256 = "1q71kfjiav8xfw1bb3dziik1d0jr84hl83d3sx3cak0nd9nmakgs";
};
meta = {
description = "A command line tool for DigitalOcean services";
homepage = https://github.com/digitalocean/doctl;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.siddharthist ];
};
}