-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
42 lines (39 loc) · 1.08 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
{
description = "Pixelpact Project Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
playwright.url = "github:pietdevries94/playwright-web-flake/1.46.1";
};
outputs = {
playwright,
nixpkgs,
...
}: let
forAllSystems = function:
nixpkgs.lib.genAttrs ["x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux"]
(system:
function (let
overlay = final: prev: {
inherit (playwright.packages.${system}) playwright-test playwright-driver;
};
in
import nixpkgs {
inherit system;
overlays = [overlay];
}));
in {
devShells = forAllSystems (
pkgs: {
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [nodejs];
shellHook = ''
export REPOSITORY_ROOT=$(pwd)
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS
'';
};
}
);
formatter = forAllSystems (pkgs: pkgs.alejandra);
};
}