[[https://travis-ci.org/nix-community/pnpm2nix][https://travis-ci.org/nix-community/pnpm2nix.svg?branch=master]]
*Status: Unmaintained, only compatible with lockfile version 5.0 or below (latest is 9.0 at the time of writing)*
If you would like to take over this project, or it's name with a new project open a discussion at https://github.com/orgs/nix-community/discussions.
*A maintained fork which supports pnpm version 10.0 can be found [[https://github.com/FliegendeWurst/pnpm2nix-nzbr][here]]*
* pnpm2nix
Loads =pnpm='s shrinkwrap.yaml into nix expressions.
** Example =default.nix=
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkPnpmPackage {
src = ./.;
# These default to src/package.json & src/shrinkwrap.yaml
# packageJSON = ./package.json;
# shrinkwrapYML = ./shrinkwrap.yaml;
}
#+END_SRC
More comprehensive examples can be found in the [[file://tests/][tests]].
** Managing development environments with pnpm2nix
*** default.nix
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkPnpmPackage {
src = ./.;
}
#+END_SRC
*** shell.nix
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkShell {
buildInputs = [
(mkPnpmEnv (import ./default.nix))
];
}
#+END_SRC
** Caveats and known bugs
[[https://github.com/pnpm/pnpm/issues/1035][pnpm does not currently include checksums for tarballs]]
Until this is fixed in =pnpm= github dependencies won't work unless you opt in to impure builds.
This is currently pre-alpha software, it might eat your kittens.
** License
=pnpm2nix= is released under the terms of the MIT license.
Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.
Nix
91.6%
Python
4.3%
JavaScript
3.8%
[[https://travis-ci.org/nix-community/pnpm2nix][https://travis-ci.org/nix-community/pnpm2nix.svg?branch=master]]
*Status: Unmaintained, only compatible with lockfile version 5.0 or below (latest is 9.0 at the time of writing)*
If you would like to take over this project, or it's name with a new project open a discussion at https://github.com/orgs/nix-community/discussions.
*A maintained fork which supports pnpm version 10.0 can be found [[https://github.com/FliegendeWurst/pnpm2nix-nzbr][here]]*
* pnpm2nix
Loads =pnpm='s shrinkwrap.yaml into nix expressions.
** Example =default.nix=
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkPnpmPackage {
src = ./.;
# These default to src/package.json & src/shrinkwrap.yaml
# packageJSON = ./package.json;
# shrinkwrapYML = ./shrinkwrap.yaml;
}
#+END_SRC
More comprehensive examples can be found in the [[file://tests/][tests]].
** Managing development environments with pnpm2nix
*** default.nix
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkPnpmPackage {
src = ./.;
}
#+END_SRC
*** shell.nix
#+begin_src nix
with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });
mkShell {
buildInputs = [
(mkPnpmEnv (import ./default.nix))
];
}
#+END_SRC
** Caveats and known bugs
[[https://github.com/pnpm/pnpm/issues/1035][pnpm does not currently include checksums for tarballs]]
Until this is fixed in =pnpm= github dependencies won't work unless you opt in to impure builds.
This is currently pre-alpha software, it might eat your kittens.
** License
=pnpm2nix= is released under the terms of the MIT license.
Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.
Nix
91.6%
Python
4.3%
JavaScript
3.8%