discourse.assets: pass yarnOfflineCache as environment variable
This commit is contained in:
parent
f949de4fbb
commit
499b26b7b8
1 changed files with 6 additions and 10 deletions
|
@ -159,15 +159,15 @@ let
|
|||
];
|
||||
};
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/app/assets/javascripts/yarn.lock";
|
||||
sha256 = "0s8cmy76xh4z9y932bjshmpyr04zn3yn62ld9174lks2j965qkbl";
|
||||
};
|
||||
|
||||
assets = stdenv.mkDerivation {
|
||||
pname = "discourse-assets";
|
||||
inherit version src;
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = src + "/app/assets/javascripts/yarn.lock";
|
||||
sha256 = "0s8cmy76xh4z9y932bjshmpyr04zn3yn62ld9174lks2j965qkbl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = runtimeDeps ++ [
|
||||
postgresql
|
||||
redis
|
||||
|
@ -203,7 +203,7 @@ let
|
|||
export HOME=$NIX_BUILD_TOP/fake_home
|
||||
|
||||
# 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_yarn_lock}/bin/fixup_yarn_lock app/assets/javascripts/yarn.lock
|
||||
|
@ -261,10 +261,6 @@ let
|
|||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit yarnOfflineCache;
|
||||
};
|
||||
};
|
||||
|
||||
discourse = stdenv.mkDerivation {
|
||||
|
|
Loading…
Reference in a new issue