nix-community / yarn2nix

Generate nix expressions from a yarn.lock file [maintainer=???]
GNU General Public License v3.0
123 stars 61 forks source link

Support for Yarn workspaces #58

Closed nightkr closed 6 years ago

nightkr commented 6 years ago

This adds a new argument workspaceDependencies to mkYarnPackage, the contents of which are added to a Yarn Workspace before yarn install. Example:

  rec {
    package-one = yarn2nix.mkYarnPackage {
      src = ./workspace/package-one;
      yarnLock = ./workspace/yarn.lock;
      workspaceDependencies = { inherit package-two; };
    };
    package-two = yarn2nix.mkYarnPackage {
      src = ./workspace/package-two;
      yarnLock = ./workspace/yarn.lock;
    };
  }.package-one

Notes:

This (sort of) fixes #57.

nightkr commented 6 years ago

Done @zimbatm

zimbatm commented 6 years ago

thanks!