From 91c5bcdafbbc133564a312d8d51d72c2e6fd32bc Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 1 Jan 2023 18:00:19 -0800 Subject: [PATCH] nss: convert NIX_CFLAGS_COMPILE to a list Nss has a lot of dependers, so subtle whitespace changes can cause mass rebuilds, like I did here: https://github.com/NixOS/nixpkgs/pull/208698#issuecomment-1368600990 Let's use a list instead of concatenating individual strings in order to be more robust. This will cause a lot of rebuilds, but will prevent rebuilds in the future. Sending it this cleanup to staging because of that. --- pkgs/development/libraries/nss/generic.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index 89227b78f2f73..e1b6abc5b253a 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -103,11 +103,14 @@ stdenv.mkDerivation rec { runHook postBuild ''; - NIX_CFLAGS_COMPILE = - "-Wno-error -DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\" " - + lib.optionalString stdenv.hostPlatform.is64bit "-DNSS_USE_64=1" - + lib.optionalString stdenv.hostPlatform.isILP32 " -DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c - ; + NIX_CFLAGS_COMPILE = [ + "-Wno-error" + "-DNIX_NSS_LIBDIR=\"${placeholder "out"}/lib/\"" + ] ++ lib.optionals stdenv.hostPlatform.is64bit [ + "-DNSS_USE_64=1" + ] ++ lib.optionals stdenv.hostPlatform.isILP32 [ + "-DNS_PTR_LE_32=1" # See RNG_RandomUpdate() in drdbg.c + ]; installPhase = '' runHook preInstall