nixpkgs-suyu/pkgs/development/tools/doctl/default.nix
Vincent Demeester 2394753282
doctl: 1.5.0 -> 1.7.2
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-11 15:08:47 +01:00

34 lines
964 B
Nix

{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "doctl-${version}";
version = "${major}.${minor}.${patch}";
major = "1";
minor = "7";
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 = "1nkyl5274mbdf4j60f2sj0kvvppcpccf7xws11c9vj9c3zxs7r97";
};
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 ];
};
}