Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andyrichardson/nix-node
The closest thing to nvm on Nix!
https://github.com/andyrichardson/nix-node
Last synced: 2 months ago
JSON representation
The closest thing to nvm on Nix!
- Host: GitHub
- URL: https://github.com/andyrichardson/nix-node
- Owner: andyrichardson
- Created: 2021-06-10T14:32:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T04:48:17.000Z (about 1 year ago)
- Last Synced: 2024-10-15T15:19:04.317Z (3 months ago)
- Language: Nix
- Size: 62.5 KB
- Stars: 35
- Watchers: 4
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
nix registry add node 'github:andyrichardson/nix-node'
```In `configuration.nix`
```nix
nix.registry."node".to = {
type = "github";
owner = "andyrichardson";
repo = "nix-node";
};
```### Setting up the binary cache
Via the CLI
```sh
cachix use nix-node
```In `configuration.nix`
```nix
nix.binaryCaches = [ "https://cache.nixos.org/" "https://nix-node.cachix.org/" ]
```## Usage
Using latest major releases
```sh
nix shell node#16
```Using explicit release versions
```sh
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.
```sh
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](https://github.com/andyrichardson/nix-node/blob/master/.github/workflows/build.yml#L10) to build new version.