forked from JuanM04/nix-channel
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4361195
commit 20a3237
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# nix-npm-overlay | ||
|
||
Overlay to fix Nix versions of NPM, PNPM, and Yarn. | ||
This repository is a Nix overlay for NPM, PNPM, and Yarn. It is used in [Nixpacks](https://github.com/railwayapp/nixpacks). | ||
|
||
This is used in [Nixpacks](https://github.com/railwayapp/nixpacks). | ||
Nix derivations for these package managers are automatically generated for the latest versions. | ||
|
||
## Usage | ||
|
||
```nix | ||
{ pkgs ? import <nixpkgs> {} }: | ||
let | ||
npmOverlay = import (builtins.fetchTarball "https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz"); | ||
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") { | ||
overlays = [ npmOverlay ]; | ||
}; | ||
in | ||
pkgs.buildEnv { | ||
name = "npm-overlay-env"; | ||
paths = with pkgs; [ | ||
nodejs_20 | ||
pnpm-9_x | ||
]; | ||
} | ||
``` |