forked from mirrors/nixpkgs
mastodon: pass yarnOfflineCache as environment variable
This commit is contained in:
parent
71b5df8b60
commit
f949de4fbb
|
@ -16,11 +16,6 @@ stdenv.mkDerivation rec {
|
||||||
# Putting the callPackage up in the arguments list also does not work.
|
# Putting the callPackage up in the arguments list also does not work.
|
||||||
src = if srcOverride != null then srcOverride else callPackage ./source.nix {};
|
src = if srcOverride != null then srcOverride else callPackage ./source.nix {};
|
||||||
|
|
||||||
yarnOfflineCache = fetchYarnDeps {
|
|
||||||
yarnLock = "${src}/yarn.lock";
|
|
||||||
sha256 = "sha256-2NSibx026ENAqphGGhNoLwUldWTEPbDBrYu3hgeRlnM=";
|
|
||||||
};
|
|
||||||
|
|
||||||
mastodon-gems = bundlerEnv {
|
mastodon-gems = bundlerEnv {
|
||||||
name = "${pname}-gems-${version}";
|
name = "${pname}-gems-${version}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -45,6 +40,11 @@ stdenv.mkDerivation rec {
|
||||||
pname = "${pname}-modules";
|
pname = "${pname}-modules";
|
||||||
inherit src version;
|
inherit src version;
|
||||||
|
|
||||||
|
yarnOfflineCache = fetchYarnDeps {
|
||||||
|
yarnLock = "${src}/yarn.lock";
|
||||||
|
sha256 = "sha256-2NSibx026ENAqphGGhNoLwUldWTEPbDBrYu3hgeRlnM=";
|
||||||
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ fixup_yarn_lock nodejs-slim yarn mastodon-gems mastodon-gems.wrappedRuby ];
|
nativeBuildInputs = [ fixup_yarn_lock nodejs-slim yarn mastodon-gems mastodon-gems.wrappedRuby ];
|
||||||
|
|
||||||
RAILS_ENV = "production";
|
RAILS_ENV = "production";
|
||||||
|
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
|
||||||
# Otherwise we encounter this upstream issue: https://github.com/mastodon/mastodon/issues/17924
|
# Otherwise we encounter this upstream issue: https://github.com/mastodon/mastodon/issues/17924
|
||||||
export NODE_OPTIONS=--openssl-legacy-provider
|
export NODE_OPTIONS=--openssl-legacy-provider
|
||||||
fixup_yarn_lock ~/yarn.lock
|
fixup_yarn_lock ~/yarn.lock
|
||||||
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
|
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
|
||||||
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
|
||||||
|
|
||||||
patchShebangs ~/bin
|
patchShebangs ~/bin
|
||||||
|
|
Loading…
Reference in a new issue