hcloud: 1.13.0 -> 1.14.0

Build with buildGoModule instead of legacy buildGoPackage.
This commit is contained in:
Olli Helenius 2019-12-01 15:03:15 +02:00
parent c4dc27cfaf
commit 299d9404e8
No known key found for this signature in database
GPG Key ID: 65B7BEC581BD1DD1
2 changed files with 10 additions and 121 deletions

View File

@ -1,8 +1,8 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoPackage rec {
buildGoModule rec {
pname = "hcloud";
version = "1.13.0";
version = "1.14.0";
goPackagePath = "github.com/hetznercloud/cli";
@ -10,24 +10,24 @@ buildGoPackage rec {
owner = "hetznercloud";
repo = "cli";
rev = "v${version}";
sha256 = "1bin9gcmmj3i6a11rv7czvnryl8bv7cjz3pi2cqx8baycg3hia5j";
sha256 = "167x64ni4xm0d9b02gy8zvc8knhsvb1c9jhysw7svi7iaw5f2ds5";
};
goDeps = ./deps.nix;
modSha256 = "1g81szkrkxmv51l78v0d39i8dvrrdhf8wh38rwxvnay3iajgrnqk";
buildFlagsArray = [ "-ldflags=" "-w -X github.com/hetznercloud/cli/cli.Version=${version}" ];
postInstall = ''
mkdir -p \
$bin/etc/bash_completion.d \
$bin/share/zsh/vendor-completions
$out/etc/bash_completion.d \
$out/share/zsh/vendor-completions
# Add bash completions
$bin/bin/hcloud completion bash > "$bin/etc/bash_completion.d/hcloud"
$out/bin/hcloud completion bash > "$out/etc/bash_completion.d/hcloud"
# Add zsh completions
echo "#compdef hcloud" > "$bin/share/zsh/vendor-completions/_hcloud"
$bin/bin/hcloud completion zsh >> "$bin/share/zsh/vendor-completions/_hcloud"
echo "#compdef hcloud" > "$out/share/zsh/vendor-completions/_hcloud"
$out/bin/hcloud completion zsh >> "$out/share/zsh/vendor-completions/_hcloud"
'';
meta = {

View File

@ -1,111 +0,0 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
[
{
goPackagePath = "github.com/dustin/go-humanize";
fetch = {
type = "git";
url = "https://github.com/dustin/go-humanize";
rev = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e";
sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3";
};
}
{
goPackagePath = "github.com/fatih/structs";
fetch = {
type = "git";
url = "https://github.com/fatih/structs";
rev = "878a968ab22548362a09bdb3322f98b00f470d46";
sha256 = "15nkffa8ylr5kkv52gyry675l8bzv3c0xx39j0fzz0vp2kcjyy8x";
};
}
{
goPackagePath = "github.com/gosuri/uilive";
fetch = {
type = "git";
url = "https://github.com/gosuri/uilive";
rev = "4512d98b127f3f3a1b7c3cf1104969fdd17b31d9";
sha256 = "12n3kjgdzrb50jhkcb2ac3437mdhxh33zrcz7mi4gpji20jz4ai7";
};
}
{
goPackagePath = "github.com/gosuri/uiprogress";
fetch = {
type = "git";
url = "https://github.com/gosuri/uiprogress";
rev = "4442fea128d2bc91caf276b08518bdf4582561c8";
sha256 = "1g6xjknm0981h3b1drbvm6vd66hiah1cylpdck9cqd18kyxd6bpd";
};
}
{
goPackagePath = "github.com/hetznercloud/cli";
fetch = {
type = "git";
url = "https://github.com/hetznercloud/cli";
rev = "d6ec656f964aac4382d9c724edd27a8608e7b354";
sha256 = "0ng7hihzplwyz4sdipms4m9qq2bcj92qczzd5adhm6da851jxpbc";
};
}
{
goPackagePath = "github.com/hetznercloud/hcloud-go";
fetch = {
type = "git";
url = "https://github.com/hetznercloud/hcloud-go";
rev = "70b166c92266125ee6a621dcc6089023a5f8d055";
sha256 = "02hh214qk8qrhl9rpaywv2z5jpkzx3y2j8gv5xmdprdamrjwwlbc";
};
}
{
goPackagePath = "github.com/pelletier/go-toml";
fetch = {
type = "git";
url = "https://github.com/pelletier/go-toml";
rev = "84da2c4a25c585816f2c4211b699228d111d18ab";
sha256 = "1zh5kswqckz7aaz4kpd1kxbxnlhlmprba1ghkl742x6mbv3w08bm";
};
}
{
goPackagePath = "github.com/spf13/cobra";
fetch = {
type = "git";
url = "https://github.com/spf13/cobra";
rev = "1c9c46d5c1cc2aaebdd1898c0680e85e8a44b36d";
sha256 = "0mxliq4gfvdazga8mapc2sazi915rz1h6prnark9hwbbsz0xn0r3";
};
}
{
goPackagePath = "github.com/spf13/pflag";
fetch = {
type = "git";
url = "https://github.com/spf13/pflag";
rev = "24fa6976df40757dce6aea913e7b81ade90530e1";
sha256 = "0rf6prz6gl0l1b3wijzdgq887cdwigvzxvz6gqbm5l8pkq3fx1m9";
};
}
{
goPackagePath = "github.com/thcyron/uiprogress";
fetch = {
type = "git";
url = "https://github.com/thcyron/uiprogress";
rev = "25e98ffb0e98b5192b475d8f2fd78083bfe9a67e";
sha256 = "1avb0jykn3qbjrvhc8i50ahisf9rsfy74ysrwfqbqqkpvhdxv12i";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "4def268fd1a49955bfb3dda92fe3db4f924f2285";
sha256 = "1bfsnari529gw34cz0zqk3d9mrkcj1ay35kangri8kbgll0ss5a6";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "fc99dfbffb4e5ed5758a37e31dd861afe285406b";
sha256 = "186x8bg926qb9sprs5zpd97xzvvhc2si7q1nhvyg12r5cd6v7zjd";
};
}
]