wiki-js: unpack into source

We effectively copy everything into `$out` (but this isn't using
`buildCommand` to allow applying custom patches). However, this had the
effect that `env-vars` was also copied into `$out` retaining a reference
to the source tarball.

Removing that reduces the closure size from 765.5M to 388.8M, i.e. by
about 50.7%.
This commit is contained in:
Maximilian Bosch 2024-10-18 18:22:17 +02:00
parent e0f63ad971
commit 3dc2d95972
No known key found for this signature in database

View File

@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-beP9k1msJjg9IQbU/CmzTodjMvUnWrLYcw0EleR1OJk=";
};
# Unpack the tarball into a subdir. All the contents are copied into `$out`.
# Unpacking into the parent directory would also copy `env-vars` into `$out`
# in the `installPhase` which ultimately means that the package retains
# references to build tools and the tarball.
preUnpack = ''
mkdir source
cd source
'';
sourceRoot = ".";
dontBuild = true;