diff options
author | Piotr Dobrowolski | 2021-01-24 17:34:30 +0100 |
---|---|---|
committer | Piotr Dobrowolski | 2021-02-05 09:50:18 +0100 |
commit | e5859bb3258351c19540eedd6a8d1dff14af1295 (patch) | |
tree | 132d0224e9856cd1cba021055a0f696316a71917 | |
parent | 059adccbe54c6a85d2366f0d0bb3956356bf64a3 (diff) |
back,pusher: reduce final derivation size
While this still is a major hack, this reduces unused node_modules
(about 200MB each) being pulled in from workadventure*-modules-* and
workadventure-messages.
-rw-r--r-- | back/default.nix | 1 | ||||
-rw-r--r-- | pusher/default.nix | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/back/default.nix b/back/default.nix index 5f92960..06325c7 100644 --- a/back/default.nix +++ b/back/default.nix @@ -62,6 +62,7 @@ yarn2nix-moretea.mkYarnPackage rec { ln -s ${workadventure.messages.outPath}/generated deps/${pname}/src/Messages/generated HOME=$TMPDIR yarn --offline run tsc cp -r deps/${pname}/dist $out/dist + rm -rf deps/${pname}/{src,node_modules} ''; postInstall = '' diff --git a/pusher/default.nix b/pusher/default.nix index bdace68..44c4c68 100644 --- a/pusher/default.nix +++ b/pusher/default.nix @@ -60,11 +60,14 @@ yarn2nix-moretea.mkYarnPackage rec { dontStrip = true; + # workadventureback below is a package name extracted from package.json, + # intended until upstream fixes that up. buildPhase = '' mkdir -p $out ln -s ${workadventure.messages.outPath}/generated deps/workadventureback/src/Messages/generated HOME=$TMPDIR yarn --offline run tsc cp -r deps/workadventureback/dist $out/dist + rm -rf deps/workadventureback/{src,node_modules} ''; postInstall = '' |