mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
peertube: parallelize gzip and brotli step (#319092)
This commit is contained in:
parent
b15dd7203f
commit
accc33c07d
@ -8,6 +8,7 @@
|
||||
, brotli
|
||||
, fixup-yarn-lock
|
||||
, jq
|
||||
, fd
|
||||
, nodejs
|
||||
, which
|
||||
, yarn
|
||||
@ -76,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "cli" "runner" ];
|
||||
|
||||
nativeBuildInputs = [ brotli fixup-yarn-lock jq which yarn ];
|
||||
nativeBuildInputs = [ brotli fixup-yarn-lock jq which yarn fd ];
|
||||
|
||||
buildInputs = [ nodejs ];
|
||||
|
||||
@ -161,10 +162,10 @@ stdenv.mkDerivation rec {
|
||||
ln -s $runner/dist/peertube-runner.js $runner/bin/peertube-runner
|
||||
|
||||
# Create static gzip and brotli files
|
||||
find $out/client/dist -type f -regextype posix-extended -iregex '.*\.(css|eot|html|js|json|svg|webmanifest|xlf)' | while read file; do
|
||||
gzip -9 -n -c $file > $file.gz
|
||||
brotli --best -f $file -o $file.br
|
||||
done
|
||||
fd -e css -e eot -e html -e js -e json -e svg -e webmanifest -e xlf \
|
||||
--type file --search-path $out/client/dist \
|
||||
--exec gzip -9 -n -c {} > {}.gz \;\
|
||||
--exec brotli --best -f {} -o {}.br
|
||||
'';
|
||||
|
||||
passthru.tests.peertube = nixosTests.peertube;
|
||||
|
Loading…
Reference in New Issue
Block a user