From 2834df37a886b2c3b76d1cbbdd510ce31059bb2d Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 1 Jan 2023 15:08:33 -0800 Subject: [PATCH] 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. --- pkgs/development/libraries/libftdi/1.x.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/libftdi/1.x.nix b/pkgs/development/libraries/libftdi/1.x.nix index e19a9764bdf9..75c9beea9b98 100644 --- a/pkgs/development/libraries/libftdi/1.x.nix +++ b/pkgs/development/libraries/libftdi/1.x.nix @@ -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}" ];