gitlab.assets: pass yarnOfflineCache as environment variable
This commit is contained in:
parent
30b725dd9b
commit
835e110915
@ -50,15 +50,15 @@ let
|
|||||||
extraConfigPaths = lib.forEach data.vendored_gems (gem: "${src}/vendor/gems/${gem}");
|
extraConfigPaths = lib.forEach data.vendored_gems (gem: "${src}/vendor/gems/${gem}");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
assets = stdenv.mkDerivation {
|
||||||
|
pname = "gitlab-assets";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
yarnOfflineCache = fetchYarnDeps {
|
yarnOfflineCache = fetchYarnDeps {
|
||||||
yarnLock = src + "/yarn.lock";
|
yarnLock = src + "/yarn.lock";
|
||||||
sha256 = data.yarn_hash;
|
sha256 = data.yarn_hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
assets = stdenv.mkDerivation {
|
|
||||||
pname = "gitlab-assets";
|
|
||||||
inherit version src;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ rubyEnv.wrappedRuby rubyEnv.bundler nodejs yarn git cacert ];
|
nativeBuildInputs = [ rubyEnv.wrappedRuby rubyEnv.bundler nodejs yarn git cacert ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -91,7 +91,7 @@ let
|
|||||||
export HOME=$NIX_BUILD_TOP/fake_home
|
export HOME=$NIX_BUILD_TOP/fake_home
|
||||||
|
|
||||||
# Make yarn install packages from our offline cache, not the registry
|
# Make yarn install packages from our offline cache, not the registry
|
||||||
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
|
||||||
|
|
||||||
# Fixup "resolved"-entries in yarn.lock to match our offline cache
|
# Fixup "resolved"-entries in yarn.lock to match our offline cache
|
||||||
${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
|
${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
|
||||||
|
Loading…
Reference in New Issue
Block a user