2016-07-19 13:30:35 +03:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "doctl-${version}";
|
2016-11-18 01:32:21 +03:00
|
|
|
version = "${major}.${minor}.${patch}";
|
|
|
|
major = "1";
|
|
|
|
minor = "5";
|
|
|
|
patch = "0";
|
2016-07-19 13:30:35 +03:00
|
|
|
goPackagePath = "github.com/digitalocean/doctl";
|
|
|
|
|
2016-11-18 01:32:21 +03: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 13:30:35 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "digitalocean";
|
|
|
|
repo = "doctl";
|
2016-11-18 01:32:21 +03:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0dk7l4b0ngqkwdlx8qgr99jzipyzazvkv7dybi75dnp725lwxkl2";
|
2016-07-19 13:30:35 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|