Unverified Commit 460e65de authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

libiio: fix build on Darwin (#447351)

parents 4ceb0f33 d8b33463
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 we’re 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 ''