1

e11sync-static: more paralellism when building

This commit is contained in:
Motiejus Jakštys 2024-01-17 08:59:02 +02:00
parent 2acf5a5bf6
commit c61408beab

View File

@ -6,6 +6,7 @@
brotli,
findutils,
dart-sass,
gawk,
}:
stdenv.mkDerivation {
name = "e11sync-static";
@ -14,6 +15,8 @@ stdenv.mkDerivation {
python3Packages.django
python3Packages.django-compressor
dart-sass
zopfli
brotli
];
patchPhase = ''patchShebangs --build manage.py'';
buildPhase = ''
@ -28,8 +31,8 @@ stdenv.mkDerivation {
-name '*.css' -or \
-name '*.js' -or \
-name '*.svg' | \
${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} sh -c \
"${zopfli}/bin/zopfli {} && ${brotli}/bin/brotli {}"
${gawk}/bin/awk '{print "zopfli "$0;print "brotli "$0}' | \
${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} $SHELL -c {}
'';
installPhase = ''mv static $out'';
}