mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
d3b80ca247
* feat: add Nix flake for reproducible dev environment - flake.nix with devShell (Node.js 24, pnpm, oxlint, Playwright, gh) - nix/checks.nix for hermetic lint/typecheck/test via nix flake check - shell.nix for backward compat, .envrc for direnv integration * fix: use corepack for exact pnpm version pinning - corepack reads packageManager field from package.json - --install-directory to writable .corepack/bin (Nix store is read-only) - COREPACK_ENABLE_DOWNLOAD_PROMPT=0 for non-interactive downloads - Remove checks.nix (sandboxed pnpm install infeasible) - Fix stale check to use .modules.yaml - Remove Playwright from Nix (let pnpm manage) - Pin shell.nix to flake-compat rev from flake.lock * chore: address review feedback on Nix dev shell - Remove unused lib and stdenv function arguments - Replace no-op PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD env var with comments documenting why we don't use Nix-provided browsers and the NixOS system library limitation - Make pnpm install non-fatal in shellHook so the shell still opens cleanly if the lockfile is stale - Improve staleness check readability (use -f guard instead of 2>/dev/null redirect) --------- Co-authored-by: Steve Faulkner <sfaulkner@cloudflare.com>
33 lines
726 B
Nix
33 lines
726 B
Nix
{
|
|
description = "vinext — Vite plugin reimplementing the Next.js API surface";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
# Backward compatibility for non-flake users (shell.nix)
|
|
flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in {
|
|
devShells.default = pkgs.callPackage ./nix/devShell.nix {};
|
|
|
|
formatter = pkgs.nixfmt;
|
|
}
|
|
);
|
|
|
|
# To update pinned dependencies: nix flake update
|
|
}
|