From c61408beab011b4cce3cae8d7a5ddb22ada61ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 17 Jan 2024 08:59:02 +0200 Subject: [PATCH] e11sync-static: more paralellism when building --- pkgs/e11sync-static.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/e11sync-static.nix b/pkgs/e11sync-static.nix index b0d6d39..6e4a1de 100644 --- a/pkgs/e11sync-static.nix +++ b/pkgs/e11sync-static.nix @@ -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''; }