-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
64 lines (55 loc) · 1.66 KB
/
flake.nix
File metadata and controls
64 lines (55 loc) · 1.66 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
{
description = "A command-line interface for managing Outline VPN servers with full API integration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
version = self.rev or "dev";
in {
formatter = pkgs.alejandra;
packages.outline-cli = pkgs.buildGoModule {
pname = "outline-cli";
inherit version;
src = ./.;
vendorHash = "sha256-0sCb33khZSpMxmUnvO7ASagONP3ytjAGYMH/2aAJDxA=";
env.CGO_ENABLED = 0;
ldflags = [
"-s -w -X main.Version=${version}"
];
meta = with pkgs.lib; {
description = "A command-line interface for managing Outline VPN servers with full API integration";
homepage = "https://github.com/art-shutter/outline-cli";
maintainers = ["art-shutter"];
mainProgram = "outline-cli";
platforms = platforms.unix ++ platforms.darwin;
};
};
packages.default = self.packages.${system}.outline-cli;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go
golangci-lint
gopls
just
pre-commit
];
shellHook = ''
export PATH="$(pwd)/result/bin:''${PATH}"
pre-commit install --install-hooks --overwrite
'';
};
}
);
}