nixpkgs/pkgs/servers/hasura/cli.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
845 B
Nix
Raw Normal View History

2019-12-11 21:41:31 +01:00
{ buildGoModule, hasura-graphql-engine }:
buildGoModule rec {
pname = "hasura";
2019-12-11 21:41:31 +01:00
version = hasura-graphql-engine.version;
src = hasura-graphql-engine.src;
modRoot = "./cli";
subPackages = [ "cmd/hasura" ];
vendorSha256 = "0rjh4rs92jj56il3hg8msjz0w0iv25lydnh9v1kxmvdzy1x75b2b";
2019-12-11 21:41:31 +01:00
doCheck = false;
2021-08-26 08:45:51 +02:00
ldflags = [
"-X github.com/hasura/graphql-engine/cli/version.BuildVersion=${version}"
"-s"
"-w"
];
2019-12-11 21:41:31 +01:00
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";
};
}