2019-12-11 23:41:31 +03:00
|
|
|
{ buildGoModule, hasura-graphql-engine }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
name = "hasura-${version}";
|
|
|
|
version = hasura-graphql-engine.version;
|
|
|
|
|
|
|
|
src = hasura-graphql-engine.src;
|
|
|
|
modRoot = "./cli";
|
|
|
|
|
|
|
|
subPackages = [ "cmd/hasura" ];
|
|
|
|
|
2020-08-13 23:43:19 +03:00
|
|
|
vendorSha256 = "sha256-Fp6o3xZ/964q8yzJJFrqWZtQ5zYNy6Wreh42YxWjNbU=";
|
2019-12-11 23:41:31 +03:00
|
|
|
|
2020-08-04 03:26:27 +03:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-12-11 23:41:31 +03:00
|
|
|
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";
|
|
|
|
};
|
2020-07-31 06:58:04 +03:00
|
|
|
}
|