2016-07-19 12:30:35 +02:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "doctl-${version}";
|
2016-11-17 23:32:21 +01:00
|
|
|
version = "${major}.${minor}.${patch}";
|
|
|
|
major = "1";
|
2018-03-11 15:08:47 +01:00
|
|
|
minor = "7";
|
|
|
|
patch = "2";
|
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\)'';
|
|
|
|
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 12:30:35 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "digitalocean";
|
|
|
|
repo = "doctl";
|
2016-11-17 23:32:21 +01:00
|
|
|
rev = "v${version}";
|
2018-03-11 15:08:47 +01:00
|
|
|
sha256 = "1nkyl5274mbdf4j60f2sj0kvvppcpccf7xws11c9vj9c3zxs7r97";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|