2016-07-19 11:30:35 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "doctl-${version}";
|
2016-11-17 22:32:21 +00:00
|
|
|
version = "${major}.${minor}.${patch}";
|
|
|
|
major = "1";
|
2018-12-30 11:44:55 +00:00
|
|
|
minor = "12";
|
|
|
|
patch = "2";
|
2016-07-19 11:30:35 +01:00
|
|
|
goPackagePath = "github.com/digitalocean/doctl";
|
|
|
|
|
2016-11-17 22:32:21 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2016-07-19 11:30:35 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "digitalocean";
|
2018-04-21 00:09:02 +01:00
|
|
|
repo = "doctl";
|
|
|
|
rev = "v${version}";
|
2018-12-30 11:44:55 +00:00
|
|
|
sha256 = "01li9ywzvmzmhqgk9a5li2wkqmdn7jl8pqz2rn7dnay4fr2259fv";
|
2016-07-19 11:30:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A command line tool for DigitalOcean services";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://github.com/digitalocean/doctl;
|
2016-07-19 11:30:35 +01:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.siddharthist ];
|
|
|
|
};
|
|
|
|
}
|