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:
# https://registry.npmjs.org/react-window-infinite-loader/-/react-window-infinite-loader-1.0.7.tgz
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"
else null;
unpackPhase = import ./unpackPhase.nix {};
# - installs dependencies into the node_modules directory
@ -276,9 +279,10 @@ in {
dream2nix.modules.drv-parts.mkDerivation
(commonModule defaultPackageName defaultPackageVersion)
];
deps = {nixpkgs, ...}: {
inherit (nixpkgs) mkShell;
};
deps = {nixpkgs, ...}:
l.mapAttrs (_: l.mkDefault) {
inherit (nixpkgs) mkShell;
};
env = {
packageName = config.name;
};