From 5e80541a726e08ddbf5f6922d2389891a8c299db Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sun, 1 Feb 2026 23:47:19 +0100 Subject: [PATCH] talloc: move NIX_LDFLAGS into env for structuredAttrs --- pkgs/by-name/ta/talloc/package.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ta/talloc/package.nix b/pkgs/by-name/ta/talloc/package.nix index ac7cd1b5d6ba..54d20c9aaeb5 100644 --- a/pkgs/by-name/ta/talloc/package.nix +++ b/pkgs/by-name/ta/talloc/package.nix @@ -60,15 +60,18 @@ stdenv.mkDerivation rec { "--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"; + }; # this must not be exported before the ConfigurePhase otherwise waf whines preBuild = lib.optionalString stdenv.hostPlatform.isMusl ''