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 @@ 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) 5 6 # So, try first to find the CMake module provided by libxml2 package, then fallback 6 7 # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially 7 8 # in static build case). 8 - - find_package(LibXml2 QUIET NO_MODULE) 9 + - find_package(LibXml2 QUIET NO_MODULE NO_SYSTEM_ENVIRONMENT_PATH) 9 10 + find_package(LibXml2 QUIET MODULE) 10 11 if(DEFINED LIBXML2_VERSION_STRING) 11 12 set(LIBXML2_FOUND ON) 12 13 set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) 13 - Seulement dans b: good.patch
+11 -30
pkgs/by-name/li/libiio/hardcode-library-path.patch
··· 1 1 diff --git a/bindings/python/iio.py b/bindings/python/iio.py 2 - index 5306daa..f8962ee 100644 2 + index b91260cc..04bcfa7f 100644 3 3 --- a/bindings/python/iio.py 4 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 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 9 13 - _iiolib = "iio" 10 - + _iiolib = "@libiio@" 11 - 14 + - 12 15 -_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True) 13 - +_lib = _cdll(_iiolib, use_errno=True, use_last_error=True) 16 + +_lib = _cdll("@libiio@", use_errno=True, use_last_error=True) 14 17 15 18 _get_backends_count = _lib.iio_get_backends_count 16 19 _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:
+18 -10
pkgs/by-name/li/libiio/package.nix
··· 18 18 19 19 stdenv.mkDerivation rec { 20 20 pname = "libiio"; 21 - version = "0.24"; 21 + version = "0.26"; 22 22 23 23 outputs = [ 24 24 "out" ··· 29 29 src = fetchFromGitHub { 30 30 owner = "analogdevicesinc"; 31 31 repo = "libiio"; 32 - rev = "v${version}"; 33 - sha256 = "sha256-c5HsxCdp1cv5BGTQ/8dc8J893zk9ntbfAudLpqoQ1ow="; 32 + tag = "v${version}"; 33 + hash = "sha256-nrpGccj9Q3S9wYs0/dHC3YAy5ZvTiPiSUtPY6r5WlaE="; 34 34 }; 35 35 36 36 # Revert after https://github.com/NixOS/nixpkgs/issues/125008 is 37 37 # fixed properly 38 - patches = [ ./cmake-fix-libxml2-find-package.patch ]; 38 + patches = [ 39 + ./cmake-fix-libxml2-find-package.patch 40 + ]; 39 41 40 42 nativeBuildInputs = 41 43 [ ··· 79 81 80 82 postPatch = 81 83 '' 82 - substituteInPlace libiio.rules.cmakein \ 83 - --replace /bin/sh ${runtimeShell} 84 + patchShebangs libiio.rules.cmakein 84 85 '' 85 86 + lib.optionalString pythonSupport '' 86 87 # Hardcode path to the shared library into the bindings. ··· 92 93 moveToOutput ${python3.sitePackages} "$python" 93 94 ''; 94 95 95 - meta = with lib; { 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}"; 96 104 description = "API for interfacing with the Linux Industrial I/O Subsystem"; 97 105 homepage = "https://github.com/analogdevicesinc/libiio"; 98 - license = licenses.lgpl21Plus; 99 - platforms = platforms.linux ++ platforms.darwin; 100 - maintainers = with maintainers; [ thoughtpolice ]; 106 + license = lib.licenses.lgpl21Plus; 107 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 108 + maintainers = with lib.maintainers; [ thoughtpolice ]; 101 109 }; 102 110 }