nixpkgs/pkgs/by-name/nh/nhost-cli/package.nix
2024-11-26 03:10:55 +00:00

42 lines
853 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "nhost-cli";
version = "1.27.1";
src = fetchFromGitHub {
owner = "nhost";
repo = "cli";
rev = "refs/tags/v${version}";
hash = "sha256-31YkO0zvAp470pQQKapkwXnk6uDmzIZlLMQVsPhGaZ4=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X=main.Version=v${version}"
];
postInstall = ''
mv $out/bin/cli $out/bin/nhost
'';
# require network access
checkFlags = [ "-skip=^TestMakeJSONRequest$" ];
meta = {
description = "Tool for setting up a local development environment for Nhost";
homepage = "https://github.com/nhost/cli";
changelog = "https://github.com/nhost/cli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moraxyc ];
mainProgram = "nhost";
};
}