libiio: 0.24 -> 0.26

Diff: https://github.com/analogdevicesinc/libiio/compare/v0.24...v0.26

Changelog: https://github.com/analogdevicesinc/libiio/releases/tag/v0.25
https://github.com/analogdevicesinc/libiio/releases/tag/v0.26

+35 -46
+6 -6
pkgs/by-name/li/libiio/cmake-fix-libxml2-find-package.patch
··· 1 - diff --color -ur a/CMakeLists.txt b/CMakeLists.txt 2 - --- a/CMakeLists.txt 2022-06-02 02:57:01.503340155 +0300 3 - +++ b/CMakeLists.txt 2022-06-02 02:54:33.726941188 +0300 4 - @@ -378,7 +378,7 @@ 5 # So, try first to find the CMake module provided by libxml2 package, then fallback 6 # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially 7 # in static build case). 8 - - find_package(LibXml2 QUIET NO_MODULE) 9 + find_package(LibXml2 QUIET MODULE) 10 if(DEFINED LIBXML2_VERSION_STRING) 11 set(LIBXML2_FOUND ON) 12 set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) 13 - Seulement dans b: good.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index d5313c50..0ef102bf 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -408,7 +408,7 @@ if (WITH_XML_BACKEND) 6 # So, try first to find the CMake module provided by libxml2 package, then fallback 7 # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially 8 # in static build case). 9 + - find_package(LibXml2 QUIET NO_MODULE NO_SYSTEM_ENVIRONMENT_PATH) 10 + find_package(LibXml2 QUIET MODULE) 11 if(DEFINED LIBXML2_VERSION_STRING) 12 set(LIBXML2_FOUND ON) 13 set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
+11 -30
pkgs/by-name/li/libiio/hardcode-library-path.patch
··· 1 diff --git a/bindings/python/iio.py b/bindings/python/iio.py 2 - index 5306daa..f8962ee 100644 3 --- a/bindings/python/iio.py 4 +++ b/bindings/python/iio.py 5 - @@ -229,9 +229,9 @@ if "Windows" in _system(): 6 - _iiolib = "libiio.dll" 7 - else: 8 - # Non-windows, possibly Posix system 9 - _iiolib = "iio" 10 - + _iiolib = "@libiio@" 11 - 12 -_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True) 13 - +_lib = _cdll(_iiolib, use_errno=True, use_last_error=True) 14 15 _get_backends_count = _lib.iio_get_backends_count 16 _get_backends_count.restype = c_uint 17 - diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein 18 - index cd14e2e..516c409 100644 19 - --- a/bindings/python/setup.py.cmakein 20 - +++ b/bindings/python/setup.py.cmakein 21 - @@ -62,7 +62,7 @@ class InstallWrapper(install): 22 - _iiolib = "libiio.dll" 23 - else: 24 - # Non-windows, possibly Posix system 25 - - _iiolib = "iio" 26 - + _iiolib = "@libiio@" 27 - try: 28 - import os 29 - 30 - @@ -72,7 +72,7 @@ class InstallWrapper(install): 31 - fulllibpath = find_recursive(destdir, "libiio.so") 32 - _lib = _cdll(fulllibpath, use_errno=True, use_last_error=True) 33 - else: 34 - - _lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True) 35 - + _lib = _cdll(_iiolib, use_errno=True, use_last_error=True) 36 - if not _lib._name: 37 - raise OSError 38 - except OSError:
··· 1 diff --git a/bindings/python/iio.py b/bindings/python/iio.py 2 + index b91260cc..04bcfa7f 100644 3 --- a/bindings/python/iio.py 4 +++ b/bindings/python/iio.py 5 + @@ -218,13 +218,7 @@ _ChannelPtr = _POINTER(_Channel) 6 + _BufferPtr = _POINTER(_Buffer) 7 + _DataFormatPtr = _POINTER(DataFormat) 8 + 9 + -if "Windows" in _system(): 10 + - _iiolib = "libiio.dll" 11 + -else: 12 + - # Non-windows, possibly Posix system 13 - _iiolib = "iio" 14 + - 15 -_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True) 16 + +_lib = _cdll("@libiio@", use_errno=True, use_last_error=True) 17 18 _get_backends_count = _lib.iio_get_backends_count 19 _get_backends_count.restype = c_uint
+18 -10
pkgs/by-name/li/libiio/package.nix
··· 18 19 stdenv.mkDerivation rec { 20 pname = "libiio"; 21 - version = "0.24"; 22 23 outputs = [ 24 "out" ··· 29 src = fetchFromGitHub { 30 owner = "analogdevicesinc"; 31 repo = "libiio"; 32 - rev = "v${version}"; 33 - sha256 = "sha256-c5HsxCdp1cv5BGTQ/8dc8J893zk9ntbfAudLpqoQ1ow="; 34 }; 35 36 # Revert after https://github.com/NixOS/nixpkgs/issues/125008 is 37 # fixed properly 38 - patches = [ ./cmake-fix-libxml2-find-package.patch ]; 39 40 nativeBuildInputs = 41 [ ··· 79 80 postPatch = 81 '' 82 - substituteInPlace libiio.rules.cmakein \ 83 - --replace /bin/sh ${runtimeShell} 84 '' 85 + lib.optionalString pythonSupport '' 86 # Hardcode path to the shared library into the bindings. ··· 92 moveToOutput ${python3.sitePackages} "$python" 93 ''; 94 95 - meta = with lib; { 96 description = "API for interfacing with the Linux Industrial I/O Subsystem"; 97 homepage = "https://github.com/analogdevicesinc/libiio"; 98 - license = licenses.lgpl21Plus; 99 - platforms = platforms.linux ++ platforms.darwin; 100 - maintainers = with maintainers; [ thoughtpolice ]; 101 }; 102 }
··· 18 19 stdenv.mkDerivation rec { 20 pname = "libiio"; 21 + version = "0.26"; 22 23 outputs = [ 24 "out" ··· 29 src = fetchFromGitHub { 30 owner = "analogdevicesinc"; 31 repo = "libiio"; 32 + tag = "v${version}"; 33 + hash = "sha256-nrpGccj9Q3S9wYs0/dHC3YAy5ZvTiPiSUtPY6r5WlaE="; 34 }; 35 36 # Revert after https://github.com/NixOS/nixpkgs/issues/125008 is 37 # fixed properly 38 + patches = [ 39 + ./cmake-fix-libxml2-find-package.patch 40 + ]; 41 42 nativeBuildInputs = 43 [ ··· 81 82 postPatch = 83 '' 84 + patchShebangs libiio.rules.cmakein 85 '' 86 + lib.optionalString pythonSupport '' 87 # Hardcode path to the shared library into the bindings. ··· 93 moveToOutput ${python3.sitePackages} "$python" 94 ''; 95 96 + nativeInstallCheckInputs = lib.optionals pythonSupport [ 97 + python3.pkgs.pythonImportsCheckHook 98 + ]; 99 + 100 + pythonImportsCheck = [ "iio" ]; 101 + 102 + meta = { 103 + changelog = "https://github.com/analogdevicesinc/libiio/releases/tag/${src.tag}"; 104 description = "API for interfacing with the Linux Industrial I/O Subsystem"; 105 homepage = "https://github.com/analogdevicesinc/libiio"; 106 + license = lib.licenses.lgpl21Plus; 107 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 108 + maintainers = with lib.maintainers; [ thoughtpolice ]; 109 }; 110 }