-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdevenv.nix
More file actions
69 lines (65 loc) · 1.58 KB
/
devenv.nix
File metadata and controls
69 lines (65 loc) · 1.58 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
{
pkgs,
lib,
config,
inputs,
...
}:
let
browsers =
(builtins.fromJSON (builtins.readFile "${pkgs.playwright-driver}/browsers.json")).browsers;
chromium-rev = (builtins.head (builtins.filter (x: x.name == "chromium") browsers)).revision;
firefox-rev = (builtins.head (builtins.filter (x: x.name == "firefox") browsers)).revision;
playwrightRuntimeLibraries = with pkgs; [
stdenv.cc.cc.lib
xorg.libxcb
xorg.libX11
xorg.libXext
xorg.libXrandr
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXfixes
xorg.libXi
xorg.libXrender
gtk3
pango
atk
cairo
gdk-pixbuf
glib
alsa-lib
freetype
fontconfig
dbus
];
in
{
# https://devenv.sh/packages/
packages = with pkgs; [
git
bashInteractive
biome
playwright-driver.browsers
];
env = with pkgs; {
PLAYWRIGHT_BROWSERS_PATH = "${playwright-driver.browsers}";
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH = "${playwright-driver.browsers}/chromium-${chromium-rev}/chrome-linux64/chrome";
PLAYWRIGHT_FIREFOX_EXECUTABLE_PATH = "${playwright-driver.browsers}/firefox-${firefox-rev}/firefox/firefox";
LD_LIBRARY_PATH = lib.makeLibraryPath playwrightRuntimeLibraries;
BIOME_BINARY = "${biome}/bin/biome";
};
# https://devenv.sh/languages/
languages.javascript = {
# disable prepending node_modules/.bin to PATH
# it is causing trouble with biome
enable = true;
bun = {
enable = true;
install = {
enable = true;
};
};
};
# See full reference at https://devenv.sh/reference/options/
}