-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
92 lines (85 loc) · 2.46 KB
/
Copy pathflake.nix
File metadata and controls
92 lines (85 loc) · 2.46 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
description = "wgt - Warpgate target picker for the terminal";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in
{
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.buildGoModule {
pname = "wgt";
version = "unstable";
src = self;
subPackages = [ "cmd/wgt" ];
vendorHash = "sha256-AApmluLX9ldLI6Zxh5YbOMm7SUe7xrrKQzEPjlCoKbE=";
meta = with pkgs.lib; {
description = "Warpgate target picker for the terminal";
homepage = "https://github.com/oddship/wg-tui";
license = licenses.mit;
mainProgram = "wgt";
platforms = platforms.unix;
};
};
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/wgt";
};
});
devShells = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
libwebsocketsForDocs = pkgs.libwebsockets.overrideAttrs (old: {
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
"-DLWS_WITH_EVLIB_PLUGINS=OFF"
"-DLWS_WITH_LIBUV=ON"
];
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libuv ];
});
ttydForDocs = pkgs.ttyd.override {
libwebsockets = libwebsocketsForDocs;
};
in
{
default = pkgs.mkShell {
packages = with pkgs; [
go
gopls
];
};
docs = pkgs.mkShell {
packages = with pkgs; [
chromium
dejavu_fonts
ffmpeg
fontconfig
go
gopls
jetbrains-mono
python3
ttydForDocs
vhs
];
shellHook = ''
export VHS_NO_SANDBOX=1
export CHROME_PATH="${pkgs.chromium}/bin/chromium"
export FONTCONFIG_FILE="${pkgs.fontconfig.out}/etc/fonts/fonts.conf"
'';
};
});
};
}