libftdi: do not force a build of python if !pythonSupport

libftdi has a `pythonSupport` parameter, but still produces a
(build-time) dependency on python even when it is set to `false`.
This commit corrects that.

This allows building tiny systems (think embedded widgets) that need
libftdi, without having to cross-build all of python for the target
system.
This commit is contained in:
Adam Joseph 2023-01-01 15:08:33 -08:00
parent 1a99acd069
commit 2834df37a8

View file

@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
"-DLINK_PYTHON_LIBRARY=${onOff pythonSupport}"
"-DPYTHON_BINDINGS=${onOff pythonSupport}"
"-DDOCUMENTATION=${onOff docSupport}"
] ++ lib.optionals pythonSupport [
"-DPYTHON_EXECUTABLE=${python3.pythonForBuild.interpreter}"
"-DPYTHON_LIBRARY=${python3}/lib/libpython${python3.pythonVersion}${stdenv.hostPlatform.extensions.sharedLibrary}"
];