Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nix-community/pnpm2nix
Load pnpm lock files into nix :) [maintainer=@adisbladis]
https://github.com/nix-community/pnpm2nix
Last synced: 3 months ago
JSON representation
Load pnpm lock files into nix :) [maintainer=@adisbladis]
- Host: GitHub
- URL: https://github.com/nix-community/pnpm2nix
- Owner: nix-community
- License: mit
- Created: 2018-02-08T07:20:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-25T10:06:43.000Z (about 1 year ago)
- Last Synced: 2024-04-14T16:06:25.178Z (7 months ago)
- Language: Nix
- Homepage:
- Size: 286 KB
- Stars: 81
- Watchers: 5
- Forks: 22
- Open Issues: 18
-
Metadata Files:
- Readme: README.org
- License: COPYING
Awesome Lists containing this project
README
[[https://travis-ci.org/nix-community/pnpm2nix][https://travis-ci.org/nix-community/pnpm2nix.svg?branch=master]]
* pnpm2nix
Loads =pnpm='s shrinkwrap.yaml into nix expressions.** Example =default.nix=
#+begin_src nix
with (import {});
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_SRCMore comprehensive examples can be found in the [[file://tests/][tests]].
** Managing development environments with pnpm2nix
*** default.nix
#+begin_src nix
with (import {});
with (import /path/to/pnpm2nix { inherit pkgs; });mkPnpmPackage {
src = ./.;
}
#+END_SRC*** shell.nix
#+begin_src nix
with (import {});
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.