3
0
Fork 0
forked from mirrors/nixpkgs

mkYarnModules: allow passing custom offlineCache

This commit is contained in:
Yureka 2021-10-06 18:26:50 +02:00 committed by Yuka
parent d6e0195ccd
commit cf6f772676

View file

@ -68,6 +68,7 @@ in rec {
packageJSON,
yarnLock,
yarnNix ? mkYarnNix { inherit yarnLock; },
offlineCache ? importOfflineCache yarnNix,
yarnFlags ? defaultYarnFlags,
pkgConfig ? {},
preBuild ? "",
@ -75,8 +76,6 @@ in rec {
workspaceDependencies ? [], # List of yarn packages
}:
let
offlineCache = importOfflineCache yarnNix;
extraBuildInputs = (lib.flatten (builtins.map (key:
pkgConfig.${key}.buildInputs or []
) (builtins.attrNames pkgConfig)));
@ -227,6 +226,7 @@ in rec {
packageJSON ? src + "/package.json",
yarnLock ? src + "/yarn.lock",
yarnNix ? mkYarnNix { inherit yarnLock; },
offlineCache ? importOfflineCache yarnNix,
yarnFlags ? defaultYarnFlags,
yarnPreBuild ? "",
yarnPostBuild ? "",
@ -253,7 +253,7 @@ in rec {
preBuild = yarnPreBuild;
postBuild = yarnPostBuild;
workspaceDependencies = workspaceDependenciesTransitive;
inherit packageJSON pname version yarnLock yarnNix yarnFlags pkgConfig;
inherit packageJSON pname version yarnLock offlineCache yarnFlags pkgConfig;
};
publishBinsFor_ = unlessNull publishBinsFor [pname];