Files
Microsoft-Rewards-Bot/setup/nix/flake.nix
2025-11-11 12:59:42 +01:00

41 lines
925 B
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
nodejs
playwright-driver.browsers
typescript
playwright-test
# fixes "waiting until load" issue compared to
# setting headless in config.json
xvfb-run
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
npm i
npm run build
'';
};
}
);
}