Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seungheonoh/npm submodule #1460

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
, spagoPackages ? "${src}/spago-packages.nix"
# Configuration that will be used to generate a `devShell` for the project
, shell ? { }
# Path to submodule locations that needs to be copied when making node env
klntsky marked this conversation as resolved.
Show resolved Hide resolved
, submodules ? [ ]
, ...
}:
let
Expand All @@ -38,6 +40,13 @@ let
cd $out
cp ${packageLock} ./package-lock.json
cp ${packageJson} ./package.json
cp ${
pkgs.linkFarm "node-packages-${projectName}-source"
(builtins.map (path: {
inherit path;
name = builtins.baseNameOf (builtins.toString path);
}) submodules)
}/* . -r
SeungheonOh marked this conversation as resolved.
Show resolved Hide resolved
node2nix ${pkgs.lib.optionalString withDevDeps "--development" } \
--lock ./package-lock.json -i ./package.json
'')
Expand Down