From 162c184b6248b1dcd486b1c8d498370ab72b4cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 19 May 2024 18:00:22 +0200 Subject: [PATCH] rsync: use enableFeature as suggested in https://github.com/NixOS/nixpkgs/pull/311785#pullrequestreview-2057265166 --- pkgs/applications/networking/sync/rsync/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/sync/rsync/default.nix b/pkgs/applications/networking/sync/rsync/default.nix index 555fb68416b8..e20e3c73d7a4 100644 --- a/pkgs/applications/networking/sync/rsync/default.nix +++ b/pkgs/applications/networking/sync/rsync/default.nix @@ -39,6 +39,10 @@ stdenv.mkDerivation rec { ++ lib.optional enableXXHash xxHash; configureFlags = [ + (lib.enableFeature enableLZ4 "lz4") + (lib.enableFeature enableOpenSSL "openssl") + (lib.enableFeature enableXXHash "xxhash") + (lib.enableFeature enableZstd "zstd") "--with-nobody-group=nogroup" # disable the included zlib explicitly as it otherwise still compiles and @@ -47,14 +51,6 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64) [ # fix `multiversioning needs 'ifunc' which is not supported on this target` error "--disable-roll-simd" - ] ++ lib.optionals (!enableZstd) [ - "--disable-zstd" - ] ++ lib.optionals (!enableXXHash) [ - "--disable-xxhash" - ] ++ lib.optionals (!enableLZ4) [ - "--disable-lz4" - ] ++ lib.optionals (!enableOpenSSL) [ - "--disable-openssl" ]; enableParallelBuilding = true;