forked from santifer/career-ops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
45 lines (33 loc) · 1.14 KB
/
flake.nix
File metadata and controls
45 lines (33 loc) · 1.14 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
{
description = "career-ops - AI job search pipeline";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flakelight.url = "github:nix-community/flakelight";
};
outputs =
{ flakelight, nixpkgs, ... }:
flakelight ./. {
inputs.nixpkgs = nixpkgs;
devShell.packages =
pkgs: with pkgs; [
nodejs
bun
coreutils
playwright-driver.browsers
];
devShell.env = pkgs: {
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true";
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
};
devShell.shellHook = pkgs: ''
# Pin npm playwright to match nixpkgs browser binaries
EXPECTED="${pkgs.playwright-driver.version}"
CURRENT=$(node -e "try{console.log(require('playwright-core/package.json').version)}catch{}" 2>/dev/null)
if [ "$CURRENT" != "$EXPECTED" ]; then
echo "Pinning playwright to $EXPECTED to match Nix-provided browsers..."
npm install --no-save "playwright@$EXPECTED" >/dev/null 2>&1
fi
'';
};
}