2024-09-11 22:09:13 -07:00
|
|
|
{
|
|
|
|
description = "Chrysoblog";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
dream2nix.url = "github:nix-community/dream2nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-parts,
|
|
|
|
dream2nix,
|
|
|
|
...
|
|
|
|
} : flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
flake = {
|
|
|
|
};
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
];
|
|
|
|
perSystem = { system, pkgs, ... }: let
|
2024-09-28 15:18:09 -07:00
|
|
|
nodejs = pkgs.nodejs_22;
|
2024-09-11 22:09:13 -07:00
|
|
|
module = {
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
dream2nix,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
dream2nix.modules.dream2nix.nodejs-package-lock-v3
|
|
|
|
dream2nix.modules.dream2nix.nodejs-granular-v3
|
|
|
|
];
|
|
|
|
|
|
|
|
mkDerivation = {
|
|
|
|
src = ./.;
|
|
|
|
};
|
|
|
|
|
|
|
|
deps = { pkgs, ...}: {
|
|
|
|
};
|
|
|
|
|
|
|
|
nodejs-package-lock-v3 = {
|
|
|
|
packageLockFile = "${config.mkDerivation.src}/package-lock.json";
|
|
|
|
};
|
|
|
|
|
|
|
|
# This must match project name in `package.json`, and it cannot have spaces.
|
|
|
|
name = "chrysoblog";
|
|
|
|
version = "0.1.0";
|
|
|
|
};
|
|
|
|
in rec {
|
|
|
|
packages = {
|
|
|
|
default = dream2nix.lib.evalModules {
|
|
|
|
packageSets.nixpkgs = pkgs;
|
|
|
|
modules = [
|
|
|
|
module
|
|
|
|
{
|
|
|
|
paths.projectRoot = ./.;
|
|
|
|
paths.package = ./.;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
2024-09-28 15:18:09 -07:00
|
|
|
packages = [
|
|
|
|
pkgs.playwright-driver.browsers
|
|
|
|
];
|
|
|
|
PLAYWRIGHT_NODEJS_PATH = "${nodejs}/bin/node";
|
|
|
|
PLAYWRIGHT_BROWSERS_PATH = "${pkgs.playwright-driver.browsers}";
|
|
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
|
|
|
|
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = 1;
|
2024-09-11 22:09:13 -07:00
|
|
|
buildInputs = [
|
2024-09-28 15:18:09 -07:00
|
|
|
nodejs
|
2024-09-11 22:09:13 -07:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|