-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: Add Nix flake support #12561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Nix flake support #12561
Changes from all commits
72aaccb
415bfb7
7a80fae
f7ca4a5
7b102ee
9913a7f
97525cd
470ae34
e693ca1
4810af7
23b03f7
35986a8
9b3ac27
fc75c36
73b46f0
b393bad
39f4f95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| description = "T3 Code development shell"; | ||
|
|
||
| inputs = { | ||
| # nixpkgs-unstable branch; the resolved revision is pinned by flake.lock. | ||
| # Regenerate with: nix flake lock (or bump with: nix flake update nixpkgs) | ||
| nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }; | ||
|
|
||
| outputs = | ||
| { nixpkgs, ... }: | ||
| let | ||
| forAllSystems = | ||
| function: | ||
| nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( | ||
| system: function nixpkgs.legacyPackages.${system} | ||
|
Comment on lines
+15
to
+16
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot Fix the code for this review comment. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review comment. |
||
| ); | ||
| in | ||
| { | ||
| formatter = forAllSystems (pkgs: pkgs.alejandra); | ||
|
|
||
| devShells = forAllSystems ( | ||
| pkgs: | ||
| let | ||
| inherit (pkgs) lib; | ||
| in | ||
| { | ||
| default = pkgs.mkShell { | ||
| packages = | ||
| with pkgs; | ||
| [ | ||
| # Node 24 (engines.node in package.json) + pnpm for `vp i`. | ||
| nodejs_24 | ||
| pnpm | ||
|
dasmatus marked this conversation as resolved.
|
||
|
|
||
| # The `vp` repo task runner (installed separately, see below). | ||
| # Rust stable: native/resource-monitor (cargo fmt + test run in CI). | ||
| cargo | ||
| rustc | ||
| rustfmt | ||
| clippy | ||
|
|
||
| # node-gyp fallback for node-pty (its prebuilds are mac/win only). | ||
| python3 | ||
| gnumake | ||
| ] | ||
| ++ lib.optionals stdenv.hostPlatform.isLinux [ | ||
| gcc | ||
| pkg-config | ||
| # browser-secret helper links against the host's libsecret. | ||
| libsecret | ||
|
dasmatus marked this conversation as resolved.
|
||
| imagemagick | ||
| ] | ||
| ++ lib.optionals stdenv.hostPlatform.isDarwin [ | ||
| # clang toolchain for node-gyp on macOS. | ||
| clang | ||
| ]; | ||
|
|
||
| # The Vite+ CLI (`vp`) is not packaged in nixpkgs. Install it once: | ||
| # curl -fsSL https://vite.plus | bash | ||
| # with VP_NODE_MANAGER=no so it reuses this shell's Node. | ||
|
dasmatus marked this conversation as resolved.
|
||
| shellHook = '' | ||
| if ! command -v vp >/dev/null 2>&1; then | ||
| echo "note: 'vp' not found. Install it with:" >&2 | ||
| echo " curl -fsSL https://vite.plus | VP_NODE_MANAGER=no bash" >&2 | ||
| fi | ||
| ''; | ||
| }; | ||
| } | ||
| ); | ||
| }; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.