From 0ca4bfa7002996b2207431d791dd66a8dd9acd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 6 Aug 2024 16:46:55 +0200 Subject: [PATCH] compress-drv: add zstd --- pkgs/build-support/compress-drv/web.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/build-support/compress-drv/web.nix b/pkgs/build-support/compress-drv/web.nix index 6bf819323886..462cd0811bb4 100644 --- a/pkgs/build-support/compress-drv/web.nix +++ b/pkgs/build-support/compress-drv/web.nix @@ -3,6 +3,7 @@ compressDrv, lib, zopfli, + zstd, }: /** compressDrvWeb compresses a derivation for common web server use. @@ -126,6 +127,10 @@ drv: compressors ? { br = "${lib.getExe brotli} --keep --no-copy-stat {}"; gz = "${lib.getExe zopfli} --keep {}"; + # --force is required to not fail on symlinks + # for details on the compression level see + # https://github.com/NixOS/nixpkgs/pull/332752#issuecomment-2275110390 + zstd = "${lib.getExe zstd} --force --keep --quiet -19 {}"; }, }: compressDrv drv {