libiio: fix build on Darwin (#447351)

This commit is contained in:
Sandro
2025-10-25 12:15:20 +00:00
committed by GitHub
+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 ''