1
Fork 0
e11sync/pkgs/e11sync-static.nix

22 lines
466 B
Nix
Raw Normal View History

2024-01-14 20:00:17 +02:00
{
runCommand,
2024-01-14 20:00:17 +02:00
zopfli,
brotli,
findutils,
e11sync-djangostatic,
}:
runCommand "e11sync-static" {
src = e11sync-djangostatic;
nativeBuildInputs = [findutils];
} ''
unpackPhase
find e11sync-djangostatic \
-name '*.css' -or \
-name '*.js' -or \
-name '*.svg' -or \
-name '*.txt' | \
tee >(xargs -n1 -P''$(nproc) ${zopfli}/bin/zopfli) | \
xargs -n1 -P''$(nproc) ${brotli}/bin/brotli
mv e11sync-djangostatic $out
''