-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
80 lines (71 loc) · 2.04 KB
/
flake.nix
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
# inspired by https://ayats.org/blog/nix-rustup/
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
# for `flake-utils.lib.eachSystem`
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ ];
config.allowUnfree = false;
};
in
{
devShells = {
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
git
just
sqlite-interactive
nodejs_20
python3 # for node-gyp
gcc # for node-gyp
playwright-driver.browsers # e2e tests
playwright-test # e2e tests
earthly
docker
docker-compose
flyctl
# darwin.apple_sdk.frameworks.Security
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH="${pkgs.playwright-driver.browsers}"
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
build = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
nodejs_20
sqlite
python3 # for node-gyp
gcc # for node-gyp
];
};
e2e = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
playwright-driver.browsers # e2e tests
playwright-test # e2e tests
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH="${pkgs.playwright-driver.browsers}"
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
};
packages = {
production = pkgs.buildEnv {
name = "production";
paths = with pkgs; [
nodejs_20
sqlite-interactive
fuse3 # for litefs
];
};
};
}
);
}