diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-05-20 01:39:43 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-05-20 01:39:43 +0200 |
commit | 1849de11ec1e32e9eebb83f24d5339bea88b7ed7 (patch) | |
tree | 0aaf3cead09c2d55c67c6f6a86ad20af399797d8 /nixpkgs/pkgs/servers/hasura/cli.nix | |
parent | 304c06d7a7ea3f5c84031d325ece8d38b8c1d829 (diff) | |
parent | 0f5ce2fac0c726036ca69a5524c59a49e2973dd4 (diff) |
Merge commit '0f5ce2fac0c726036ca69a5524c59a49e2973dd4'
Diffstat (limited to 'nixpkgs/pkgs/servers/hasura/cli.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/hasura/cli.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/hasura/cli.nix b/nixpkgs/pkgs/servers/hasura/cli.nix new file mode 100644 index 00000000000..a4d8d147fda --- /dev/null +++ b/nixpkgs/pkgs/servers/hasura/cli.nix @@ -0,0 +1,33 @@ +{ buildGoModule, hasura-graphql-engine }: + +buildGoModule rec { + name = "hasura-${version}"; + version = hasura-graphql-engine.version; + + src = hasura-graphql-engine.src; + modRoot = "./cli"; + + goPackagePath = "github.com/hasura/graphql-engine/cli"; + subPackages = [ "cmd/hasura" ]; + + vendorSha256 = "0a3mlkl00r680v8x3hy24ykggq5qm7k3101krlyfrb5y4karp75a"; + + buildFlagsArray = [''-ldflags= + -X github.com/hasura/graphql-engine/cli/version.BuildVersion=${version} + -s + -w + '']; + + postInstall = '' + mkdir -p $out/share/{bash-completion/completions,zsh/site-functions} + + export HOME=$PWD + $out/bin/hasura completion bash > $out/share/bash-completion/completions/hasura + $out/bin/hasura completion zsh > $out/share/zsh/site-functions/_hasura + ''; + + meta = { + inherit (hasura-graphql-engine.meta) license homepage maintainers; + description = "Hasura GraphQL Engine CLI"; + }; +}
\ No newline at end of file |