Unverified Commit 3dc2d959 authored by Maximilian Bosch's avatar Maximilian Bosch
Browse files

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%.
parent e0f63ad9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;