nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "brev-cli";
9 version = "0.6.316";
10
11 src = fetchFromGitHub {
12 owner = "brevdev";
13 repo = "brev-cli";
14 rev = "v${version}";
15 sha256 = "sha256-L1NpFbZXHxQQJzcLHkOIcCnHu9HRybM0R+Iz1qOheGs=";
16 };
17
18 vendorHash = "sha256-CzGuEbq4I1ygYQsoyyXC6gDBMLg21dKQTKkrbwpAR2U=";
19
20 env.CGO_ENABLED = 0;
21 subPackages = [ "." ];
22
23 ldflags = [
24 "-s"
25 "-w"
26 "-X github.com/brevdev/brev-cli/pkg/cmd/version.Version=${src.rev}"
27 ];
28
29 postInstall = ''
30 mv $out/bin/brev-cli $out/bin/brev
31 '';
32
33 meta = {
34 description = "Connect your laptop to cloud computers";
35 mainProgram = "brev";
36 homepage = "https://github.com/brevdev/brev-cli";
37 changelog = "https://github.com/brevdev/brev-cli/releases/tag/v${version}";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ dit7ya ];
40 };
41}