From ec8f4d5fecd827bdab0bdaabe6a1327dec9c1dc7 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sun, 1 Feb 2026 22:55:43 +0100 Subject: [PATCH] ldb: move NIX_LDFLAGS into env for structuredAttrs --- pkgs/by-name/ld/ldb/package.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ld/ldb/package.nix b/pkgs/by-name/ld/ldb/package.nix index 529e0c8e0e97..04d9e7d645bd 100644 --- a/pkgs/by-name/ld/ldb/package.nix +++ b/pkgs/by-name/ld/ldb/package.nix @@ -74,15 +74,18 @@ stdenv.mkDerivation (finalAttrs: { "--cross-execute=${stdenv.hostPlatform.emulator buildPackages}" ]; - # python-config from build Python gives incorrect values when cross-compiling. - # If python-config is not found, the build falls back to using the sysconfig - # module, which works correctly in all cases. - PYTHON_CONFIG = "/invalid"; - - # https://reviews.llvm.org/D135402 - NIX_LDFLAGS = lib.optional ( - stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17" - ) "--undefined-version"; + env = { + # python-config from build Python gives incorrect values when cross-compiling. + # If python-config is not found, the build falls back to using the sysconfig + # module, which works correctly in all cases. + PYTHON_CONFIG = "/invalid"; + } + // + lib.optionalAttrs (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17") + { + # https://reviews.llvm.org/D135402 + NIX_LDFLAGS = "--undefined-version"; + }; stripDebugList = [ "bin"