Skip to content

nficca/nix-anynode

Repository files navigation

nix-anynode

A Nix flake that provides packages for every distributed version of Node.js across all default systems (x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin).

Use any Node.js version in your Nix flake without waiting for nixpkgs to package it.

Disclaimer

I made this primarily for myself, and I trust me. You probably shouldn't just trust me automatically.

Before using this flake, you should:

  • Read the code and understand what it does
  • Verify the checksums and URLs in data.nix against https://nodejs.org/dist/ yourself for the specific versions of node you want

This is a single-maintainer project with automated generation. Use at your own risk.

Usage

Add this flake as an input:

{
  inputs = {
    anynode.url = "github:nficca/nix-anynode";
  };
}

Then use any Node.js version:

# Use a specific version
anynode.packages.${system}."v22.19.0"

# In a devShell
devShells.default = pkgs.mkShell {
  packages = [ anynode.packages.${system}."v22.19.0" ];
};

Generating data.nix

The data.nix file contains metadata for all Node.js versions and is automatically generated by a Rust program that scrapes https://nodejs.org/dist/ on a daily basis.

If you want to generate the file yourself, you can build and run the project in this repo like so:

cargo run --release -- --output data.nix

About

Nix flake for any version of node.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •