diff --git a/nix/default.nix b/nix/default.nix index 9d364cef1..d13b084a3 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -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 +, submodules ? [ ] , ... }: let @@ -36,6 +38,13 @@ let } '' mkdir $out cd $out + ${builtins.concatStringsSep "\n" + (builtins.map + (modulePath: + "cp ${modulePath} ./${builtins.baseNameOf (builtins.toString modulePath)} -r") + submodules + ) + } cp ${packageLock} ./package-lock.json cp ${packageJson} ./package.json node2nix ${pkgs.lib.optionalString withDevDeps "--development" } \