1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/doctl/default.nix

35 lines
970 B
Nix
Raw Normal View History

2016-07-19 11:30:35 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "doctl-${version}";
version = "${major}.${minor}.${patch}";
major = "1";
2019-05-27 18:55:42 +01:00
minor = "18";
patch = "0";
2016-07-19 11:30:35 +01:00
goPackagePath = "github.com/digitalocean/doctl";
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";
repo = "doctl";
rev = "v${version}";
2019-05-27 18:55:42 +01:00
sha256 = "1p43q1iyjj597gr47hn589fv7n26mny9niq7yb9hlmslkplsrb0a";
2016-07-19 11:30:35 +01:00
};
meta = {
description = "A command line tool for DigitalOcean services";
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 ];
};
}