nix-community / npmlock2nix

nixify npm based packages [maintainer=@andir]
Apache License 2.0
130 stars 42 forks source link

allow using local dependencies by providing their paths #192

Open icewind1991 opened 9 months ago

icewind1991 commented 9 months ago

Provide a solution for #98

With this patch, given a package.json with

"dependencies": {
    "foo": "file:../foo"
},

you can tell npmlock2nix to resolve the local dependency using

npmlock2nix.v2.node_modules {
  src = ./.;
  localPackages = {
    "foo" = ../foo;
  };
};
andir commented 8 months ago

Could you add a test case for this so we don't break it?

icewind1991 commented 8 months ago

added some tests

c0deaddict commented 1 month ago

can this be merged? i would like to use npmlock2nix with a phoenix project.