diff --git a/pkgs/servers/peertube/default.nix b/pkgs/servers/peertube/default.nix index 52b0c8799af1..3c46db2f34b3 100644 --- a/pkgs/servers/peertube/default.nix +++ b/pkgs/servers/peertube/default.nix @@ -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;