diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/hcloud')
-rw-r--r-- | nixpkgs/pkgs/development/tools/hcloud/default.nix | 40 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/tools/hcloud/deps.nix | 102 |
2 files changed, 142 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/hcloud/default.nix b/nixpkgs/pkgs/development/tools/hcloud/default.nix new file mode 100644 index 000000000000..fd05e12b4d55 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/hcloud/default.nix @@ -0,0 +1,40 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "hcloud-${version}"; + version = "1.11.0"; + + goPackagePath = "github.com/hetznercloud/cli"; + + src = fetchFromGitHub { + owner = "hetznercloud"; + repo = "cli"; + rev = "v${version}"; + sha256 = "0iknw14728l2mynrvb3fiqm7y893ppp22gbb3mppi6iy3as94f1f"; + }; + + goDeps = ./deps.nix; + + buildFlagsArray = [ "-ldflags=" "-w -X github.com/hetznercloud/cli/cli.Version=${version}" ]; + + postInstall = '' + mkdir -p \ + $bin/etc/bash_completion.d \ + $bin/share/zsh/vendor-completions + + # Add bash completions + $bin/bin/hcloud completion bash > "$bin/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" + ''; + + meta = { + description = "A command-line interface for Hetzner Cloud, a provider for cloud virtual private servers"; + homepage = https://github.com/hetznercloud/cli; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.zauberpony ]; + }; +} diff --git a/nixpkgs/pkgs/development/tools/hcloud/deps.nix b/nixpkgs/pkgs/development/tools/hcloud/deps.nix new file mode 100644 index 000000000000..b0b544701283 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/hcloud/deps.nix @@ -0,0 +1,102 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + 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 = "ac356e6e42cd31fcef8e6aec13ae9ed6fe87713e"; + sha256 = "1k28zbc14p1yqzhamp9rcagjdw6wsdb55m08nx758jwlr31az6jy"; + }; + } + { + goPackagePath = "github.com/gosuri/uiprogress"; + fetch = { + type = "git"; + url = "https://github.com/gosuri/uiprogress"; + rev = "d0567a9d84a1c40dd7568115ea66f4887bf57b33"; + sha256 = "1m7rxf71mn8w2yysc8wmf2703avhci6f4nkiijjl1f2cx4kzykck"; + }; + } + { + goPackagePath = "github.com/hetznercloud/hcloud-go"; + fetch = { + type = "git"; + url = "https://github.com/hetznercloud/hcloud-go"; + rev = "ecee721a51a772254d0104bf4d796358e40d6bbd"; + sha256 = "0bwym7f8am14yfh584p28d8lnj4f9mhqi05l1mlrl315xn0c78v3"; + }; + } + { + goPackagePath = "github.com/pelletier/go-toml"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-toml"; + rev = "27c6b39a135b7dc87a14afb068809132fb7a9a8f"; + sha256 = "13ldxh43xf4prmcrjzriz3gxpnijpqlzrgyhh7bnkj7lkhryfpk9"; + }; + } + { + goPackagePath = "github.com/spf13/cobra"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cobra"; + rev = "d2d81d9a96e23f0255397222bb0b4e3165e492dc"; + sha256 = "14nhpiyhz2lm468y5sm1vyxks5aky12kmbhmqq319s92lkm494cy"; + }; + } + { + 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 = "ff983b9c42bc9fbf91556e191cc8efb585c16908"; + sha256 = "1hpr06kzn8jnn3gvzp0p9zn4fz4l9h69f7x66idx142w4xdlaanz"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "7fbe1cd0fcc20051e1fcb87fbabec4a1bacaaeba"; + sha256 = "0y49s4kazign9nsw2x3h39cgs14lqi57m4hrka26w49z8a1xdyc6"; + }; + } +] |