fix(v1/nodejs-granular): allow empty mkDerivation.src

This commit is contained in:
DavHau 2023-06-29 16:59:41 +03:00
parent b87571ee51
commit 429171bd07

View File

@ -167,9 +167,12 @@
# example which requires this: # example which requires this:
# https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.7.tgz # https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.7.tgz
unpackCmd = unpackCmd =
if lib.hasSuffix ".tgz" config.mkDerivation.src if
(config.mkDerivation.src or null != null)
&& (lib.hasSuffix ".tgz" config.mkDerivation.src)
then "tar --delay-directory-restore -xf $src" then "tar --delay-directory-restore -xf $src"
else null; else null;
unpackPhase = import ./unpackPhase.nix {}; unpackPhase = import ./unpackPhase.nix {};
# - installs dependencies into the node_modules directory # - installs dependencies into the node_modules directory
@ -276,9 +279,10 @@ in {
dream2nix.modules.drv-parts.mkDerivation dream2nix.modules.drv-parts.mkDerivation
(commonModule defaultPackageName defaultPackageVersion) (commonModule defaultPackageName defaultPackageVersion)
]; ];
deps = {nixpkgs, ...}: { deps = {nixpkgs, ...}:
inherit (nixpkgs) mkShell; l.mapAttrs (_: l.mkDefault) {
}; inherit (nixpkgs) mkShell;
};
env = { env = {
packageName = config.name; packageName = config.name;
}; };