python3Minimal: remove pkg-config dependency

Removes the build time dependency on pkg-config if python3 is build with the `withMinimal` flag enabled

This change is driven by the motivation to use python3 earlier in stdenv for hooks.
This commit is contained in:
DavHau
2025-08-09 19:04:52 +02:00
committed by Martin Weinelt
parent bce0bb82a0
commit 9edd40908d
@@ -209,13 +209,15 @@ let
nativeBuildInputs = [
nukeReferences
]
++ optionals (!stdenv.hostPlatform.isDarwin) [
++ optionals (!stdenv.hostPlatform.isDarwin && !withMinimalDeps) [
autoconf-archive # needed for AX_CHECK_COMPILE_FLAG
autoreconfHook
]
++ optionals (!stdenv.hostPlatform.isDarwin || passthru.pythonAtLeast "3.14") [
pkg-config
]
++
optionals ((!stdenv.hostPlatform.isDarwin || passthru.pythonAtLeast "3.14") && !withMinimalDeps)
[
pkg-config
]
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
buildPackages.stdenv.cc
pythonOnBuildForHost