Skip to content

andyrichardson/nix-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

All releases of nodejs built and accessible under a single flake.

It's like nvm but for nix!

Setup

Setting up the registry

Via the CLI

nix registry add node 'github:andyrichardson/nix-node'

In configuration.nix

nix.registry."node".to = {
  type = "github";
  owner = "andyrichardson";
  repo = "nix-node";
};

Setting up the binary cache

Via the CLI

cachix use nix-node

In configuration.nix

nix.binaryCaches = [ "https://cache.nixos.org/" "https://nix-node.cachix.org/" ]

Usage

Using latest major releases

nix shell node#16

Using explicit release versions

nix shell node#16.3.0

Contributing

Open to contributions for supporting more versions, architectures, etc.

Adding new versions

Get the checksum for the new version.

version="1.0.0"
nix-prefetch-url --type sha256 "https://nodejs.org/dist/v$version/node-v$version.tar.xz"

Update flake.nix with new version and checksum.

Update CI build to build new version.

About

The closest thing to nvm on Nix!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published