-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathflake.nix
More file actions
66 lines (58 loc) · 1.4 KB
/
flake.nix
File metadata and controls
66 lines (58 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = "pangolin-cli - a VPN client for pangolin";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = {nixpkgs, ...}: let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: nixpkgs.legacyPackages.${system};
in {
packages = forAllSystems (
system: let
pkgs = pkgsFor system;
in rec {
pangolin-cli = pkgs.buildGoModule {
pname = "pangolin-cli";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
ldflags = [
"-s"
"-w"
];
meta = with pkgs.lib; {
description = "A VPN client for pangolin";
homepage = "https://github.com/fosrl/cli";
license = licenses.unfree;
maintainers = [];
mainProgram = "pangolin-cli";
};
};
default = pangolin-cli;
}
);
devShells = forAllSystems (
system: let
pkgs = pkgsFor system;
inherit
(pkgs)
go
golangci-lint
;
in {
default = pkgs.mkShell {
buildInputs = [
go
golangci-lint
];
};
}
);
};
}