From 660c4a822c1631016060ab3420ae467dabaa508e Mon Sep 17 00:00:00 2001 From: SCOTT-HAMILTON Date: Sun, 30 May 2021 14:20:21 +0200 Subject: [PATCH] libiio: fix build with wrong libxml2 find_package Co-authored-by: Dmitry Kalinkin --- .../libiio/cmake-fix-libxml2-find-package.patch | 13 +++++++++++++ pkgs/development/libraries/libiio/default.nix | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch diff --git a/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch b/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch new file mode 100644 index 000000000000..25345bef90c4 --- /dev/null +++ b/pkgs/development/libraries/libiio/cmake-fix-libxml2-find-package.patch @@ -0,0 +1,13 @@ +diff --color -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-05-30 13:46:22.256040282 +0200 ++++ b/CMakeLists.txt 2021-05-30 14:15:42.530181216 +0200 +@@ -333,7 +333,7 @@ + # So, try first to find the CMake module provided by libxml2 package, then fallback + # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially + # in static build case). +-find_package(LibXml2 QUIET NO_MODULE) ++find_package(LibXml2 QUIET MODULE) + if(DEFINED LIBXML2_VERSION_STRING) + set(LIBXML2_FOUND ON) + set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) +Seulement dans b: good.patch diff --git a/pkgs/development/libraries/libiio/default.nix b/pkgs/development/libraries/libiio/default.nix index 043e27fb4b2a..e704076ab57a 100644 --- a/pkgs/development/libraries/libiio/default.nix +++ b/pkgs/development/libraries/libiio/default.nix @@ -23,6 +23,10 @@ stdenv.mkDerivation rec { sha256 = "0psw67mzysdb8fkh8xpcwicm7z94k8plkcc8ymxyvl6inshq0mc7"; }; + # Revert after https://github.com/NixOS/nixpkgs/issues/125008 is + # fixed properly + patches = [ ./cmake-fix-libxml2-find-package.patch ]; + nativeBuildInputs = [ cmake flex