python3Packages.dbus-python: fix build when doInstallCheck=false

previously, tests are built regardless of `doCheck`/`doInstallCheck`,
but they depend on the `dbus` in `nativeCheckInputs`, breaking the
package for platforms which disable check phase (e.g. cross
compilation). so, properly avoid building tests when the check phase is
disabled.
This commit is contained in:
Colin 2024-05-08 18:40:34 +00:00
parent 001fe13a73
commit 4d4d031040
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ buildPythonPackage rec {
"-Cbuild-dir=_meson-build"
];
preConfigure = ''
if [ -z "$doInstallCheck" ]; then
export mesonFlags="$mesonFlags -Dtests=false"
fi
'';
# workaround bug in meson-python
# https://github.com/mesonbuild/meson-python/issues/240
postInstall = ''