Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/index.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.mjs.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"riscv64-linux"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Does nixpkgs support riscv64-linux platform and are Node.js packages available for it?

💡 Result:

Yes, nixpkgs supports the riscv64-linux platform at a basic level, with stdenv bootstrapping and platform definitions in lib/systems. It is listed in flake-systems.nix as a supported system and examples.nix defines riscv64-linux. However, NixOS has no official support for riscv64-linux on nixpkgs-unstable or stable channels, and there is no official Hydra binary cache (community caches like cache.ztier.in exist for unstable). Builds are possible but often fail for many packages, including coreutils and nodejs. Node.js packages are defined generically in nixpkgs and can be built for riscv64-linux in principle (nodejs.nix uses stdenv.hostPlatform.node.arch, which supports riscv64 per Node.js BUILDING.md listing riscv64 as experimental). However, native builds fail (Issue #374456 open as of 2025, brotli compilation error), and no prebuilt binaries are available in official caches. Users may need third-party builds or cross-compilation.

Citations:


Remove riscv64-linux from supportedSystems or conditionally exclude its derivatives.

Adding riscv64-linux to supportedSystems will cause flake evaluation to fail for this platform. While nixpkgs defines riscv64-linux in its platform registry, NixOS has no official support for it on nixpkgs-unstable or stable channels, and there is no official binary cache. Critically, Node.js native builds fail for riscv64-linux due to an unresolved brotli compilation error (nixpkgs issue #374456), and no prebuilt binaries are available. The flake's formatter and devShells outputs will not be evaluable for this platform without third-party or cross-compilation workarounds that are not in place here.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flake.nix` at line 17, The flake's supportedSystems list currently includes
"riscv64-linux", which causes evaluation failures; update the supportedSystems
declaration in flake.nix to remove "riscv64-linux" or wrap the list with a
conditional/filter to exclude riscv64 variants (e.g., use builtins.filter or a
small predicate) so that outputs like formatter and devShells are not evaluated
for riscv64-linux; locate the supportedSystems symbol in flake.nix and either
delete the "riscv64-linux" entry or modify the expression to exclude entries
that match "riscv64-linux" before exporting.

"x86_64-darwin"
"aarch64-darwin"
];
Expand Down
1 change: 1 addition & 0 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function getNixPlatform(archOs: string): string {
["ARM64-macOS", "aarch64-darwin"],
["X64-Linux", "x86_64-linux"],
["ARM64-Linux", "aarch64-linux"],
["RISCV64-Linux", "riscv64-linux"],
]);

const mappedTo = archOsMap.get(archOs);
Expand Down