depot/third_party/nixpkgs/pkgs/by-name/br/brev-cli/package.nix

40 lines
891 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "brev-cli";
version = "0.6.295";
src = fetchFromGitHub {
owner = "brevdev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-sdf74TsDVwCpL+2XQl64Z7tIIuM60XW9nLfAjuy5yZ0=";
};
vendorHash = "sha256-ZlL4Ts+3lZhxSkg0QlCJHtl3bg3t3nQRVIDD6GaOJnE=";
CGO_ENABLED = 0;
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
"-X github.com/brevdev/brev-cli/pkg/cmd/version.Version=${src.rev}"
];
postInstall = ''
mv $out/bin/brev-cli $out/bin/brev
'';
meta = with lib; {
description = "Connect your laptop to cloud computers";
mainProgram = "brev";
homepage = "https://github.com/brevdev/brev-cli";
changelog = "https://github.com/brevdev/brev-cli/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}