mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
35 lines
870 B
Nix
35 lines
870 B
Nix
{ buildGoModule, hasura-graphql-engine }:
|
|
|
|
buildGoModule rec {
|
|
pname = "hasura";
|
|
version = hasura-graphql-engine.version;
|
|
|
|
src = hasura-graphql-engine.src;
|
|
modRoot = "./cli";
|
|
|
|
subPackages = [ "cmd/hasura" ];
|
|
|
|
vendorHash = "sha256-S6xyevC/7dpn2Ana5mkROwIOvtQVPThoNEVKkXQmUGY=";
|
|
|
|
doCheck = false;
|
|
|
|
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";
|
|
mainProgram = "hasura";
|
|
};
|
|
}
|