1
Fork 0
This commit is contained in:
Motiejus Jakštys 2024-01-17 12:59:37 +02:00
parent 33d6c66029
commit 91806efc72
1 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,6 @@
stdenv,
runCommand,
python3Packages,
coreutils,
zopfli,
brotli,
findutils,
@ -18,22 +17,23 @@
dart-sass
zopfli
brotli
gawk
findutils
];
patchPhase = ''patchShebangs --build manage.py'';
buildPhase = ''
mkdir -p static
export E11SYNC_STATIC_ROOT=static
export E11SYNC_STATIC_ROOT=$PWD/static
export E11SYNC_DEBUG=
export E11SYNC_COMPRESS_OFFLINE=1
./manage.py collectstatic
./manage.py compress
${findutils}/bin/find static/ \
find static/ \
-name '*.css' -or \
-name '*.js' -or \
-name '*.svg' | \
${gawk}/bin/awk '{print "zopfli "$0;print "brotli "$0}' | \
${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} $SHELL -c {}
awk '{print "zopfli \""$0"\"";print "brotli \""$0"\""}' | \
xargs -P''$(nproc) -I{} $SHELL -c {}
'';
installPhase = ''mv static $out'';