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"