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