Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / hasura / cli.nix
blob09e1a5fd95c1c090be2f4315430384470b99e3c2
1 { buildGoModule, hasura-graphql-engine }:
3 buildGoModule rec {
4   pname = "hasura";
5   version = hasura-graphql-engine.version;
7   src = hasura-graphql-engine.src;
8   modRoot = "./cli";
10   subPackages = [ "cmd/hasura" ];
12   vendorHash = "sha256-S6xyevC/7dpn2Ana5mkROwIOvtQVPThoNEVKkXQmUGY=";
14   doCheck = false;
16   ldflags = [
17     "-X github.com/hasura/graphql-engine/cli/version.BuildVersion=${version}"
18     "-s"
19     "-w"
20   ];
22   postInstall = ''
23     mkdir -p $out/share/{bash-completion/completions,zsh/site-functions}
25     export HOME=$PWD
26     $out/bin/hasura completion bash > $out/share/bash-completion/completions/hasura
27     $out/bin/hasura completion zsh > $out/share/zsh/site-functions/_hasura
28   '';
30   meta = {
31     inherit (hasura-graphql-engine.meta) license homepage maintainers;
32     description = "Hasura GraphQL Engine CLI";
33     mainProgram = "hasura";
34   };