libiio: fix build on Darwin

The framework is not built on Darwin; always link against the dylib.
This commit is contained in:
Randy Eckenrode
2025-10-24 22:25:12 -04:00
parent d31a6bdfc5
commit d8b3346300
+5
View File
@@ -83,6 +83,11 @@ stdenv.mkDerivation rec {
+ lib.optionalString pythonSupport ''
# Hardcode path to the shared library into the bindings.
sed "s#@libiio@#$lib/lib/libiio${stdenv.hostPlatform.extensions.sharedLibrary}#g" ${./hardcode-library-path.patch} | patch -p1
''
+ lib.optionalString (pythonSupport && stdenv.hostPlatform.isDarwin) ''
# Because were not building the framework, always use the dylib.
substituteInPlace bindings/python/setup.py.cmakein \
--replace-fail '"iio" if "Darwin" in _system() else' ""
'';
postInstall = lib.optionalString pythonSupport ''