2016-07-19 10:30:35 +00:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "doctl";
|
2016-11-17 22:32:21 +00:00
|
|
|
version = "${major}.${minor}.${patch}";
|
|
|
|
major = "1";
|
2019-05-27 17:55:42 +00:00
|
|
|
minor = "18";
|
2019-05-05 07:43:48 +00:00
|
|
|
patch = "0";
|
2016-07-19 10:30:35 +00:00
|
|
|
goPackagePath = "github.com/digitalocean/doctl";
|
|
|
|
|
2016-11-17 22:32:21 +00:00
|
|
|
excludedPackages = ''\(doctl-gen-doc\|install-doctl\|release-doctl\)'';
|
2019-09-08 23:38:31 +00:00
|
|
|
buildFlagsArray = let t = goPackagePath; in ''
|
2016-11-17 22:32:21 +00:00
|
|
|
-ldflags=
|
|
|
|
-X ${t}.Major=${major}
|
|
|
|
-X ${t}.Minor=${minor}
|
|
|
|
-X ${t}.Patch=${patch}
|
|
|
|
-X ${t}.Label=release
|
|
|
|
'';
|
|
|
|
|
2016-07-19 10:30:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "digitalocean";
|
2018-04-20 23:09:02 +00:00
|
|
|
repo = "doctl";
|
|
|
|
rev = "v${version}";
|
2019-05-27 17:55:42 +00:00
|
|
|
sha256 = "1p43q1iyjj597gr47hn589fv7n26mny9niq7yb9hlmslkplsrb0a";
|
2016-07-19 10:30:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A command line tool for DigitalOcean services";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/digitalocean/doctl;
|
2016-07-19 10:30:35 +00:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.siddharthist ];
|
|
|
|
};
|
|
|
|
}
|