tdb: fix pkgsLLVM build

This commit is contained in:
Robert Scott
2025-02-23 17:27:58 -07:00
committed by Audrey Dutcher
parent e872faaec2
commit 1e194a33f2
+32 -21
View File
@@ -1,14 +1,16 @@
{ lib, stdenv
, fetchurl
, pkg-config
, wafHook
, buildPackages
, python3
, readline
, libxslt
, libxcrypt
, docbook-xsl-nons
, docbook_xml_dtd_45
{
lib,
stdenv,
fetchurl,
pkg-config,
wafHook,
buildPackages,
python3,
readline,
libxslt,
libxcrypt,
docbook-xsl-nons,
docbook_xml_dtd_45,
}:
stdenv.mkDerivation rec {
@@ -44,23 +46,32 @@ stdenv.mkDerivation rec {
wafPath = "buildtools/bin/waf";
wafConfigureFlags = [
"--bundled-libraries=NONE"
"--builtin-libraries=replace"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-compile"
"--cross-execute=${stdenv.hostPlatform.emulator buildPackages}"
];
wafConfigureFlags =
[
"--bundled-libraries=NONE"
"--builtin-libraries=replace"
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-compile"
"--cross-execute=${stdenv.hostPlatform.emulator buildPackages}"
];
postFixup = if stdenv.hostPlatform.isDarwin
then ''install_name_tool -id $out/lib/libtdb.dylib $out/lib/libtdb.dylib''
else null;
postFixup =
if stdenv.hostPlatform.isDarwin then
''install_name_tool -id $out/lib/libtdb.dylib $out/lib/libtdb.dylib''
else
null;
# 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";
meta = with lib; {
description = "Trivial database";
longDescription = ''