Skip to content

Load pnpm lock files into nix [clicks_fork_maintainer=@Minion3665]

License

Notifications You must be signed in to change notification settings

ClicksCodes/pnpm2nix

 
 

Repository files navigation

https://travis-ci.org/nix-community/pnpm2nix.svg?branch=master

pnpm2nix

Loads pnpm’s shrinkwrap.yaml into nix expressions.

Example default.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;
}

More comprehensive examples can be found in the tests.

Managing development environments with pnpm2nix

default.nix

with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });

mkPnpmPackage {
  src = ./.;
}

shell.nix

with (import <nixpkgs> {});
with (import /path/to/pnpm2nix { inherit pkgs; });

mkShell {
  buildInputs = [
    (mkPnpmEnv (import ./default.nix))
  ];
}

Caveats and known bugs

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.

About

Load pnpm lock files into nix [clicks_fork_maintainer=@Minion3665]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 91.7%
  • Python 4.4%
  • JavaScript 3.7%
  • Makefile 0.2%