uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -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
|
||||
67
pkgs/development/libraries/libiio/default.nix
Normal file
67
pkgs/development/libraries/libiio/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, flex
|
||||
, bison
|
||||
, libxml2
|
||||
, python
|
||||
, libusb1
|
||||
, runtimeShell
|
||||
, lib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libiio";
|
||||
version = "0.21";
|
||||
|
||||
outputs = [ "out" "lib" "dev" "python" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "analogdevicesinc";
|
||||
repo = "libiio";
|
||||
rev = "v${version}";
|
||||
sha256 = "0psw67mzysdb8fkh8xpcwicm7z94k8plkcc8ymxyvl6inshq0mc7";
|
||||
};
|
||||
|
||||
# Revert after https://github.com/NixOS/nixpkgs/issues/125008 is
|
||||
# fixed properly
|
||||
patches = [ ./cmake-fix-libxml2-find-package.patch ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
flex
|
||||
bison
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
python
|
||||
libxml2
|
||||
libusb1
|
||||
] ++ lib.optional python.isPy3k python.pkgs.setuptools;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d"
|
||||
"-DPYTHON_BINDINGS=on"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# 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
|
||||
|
||||
substituteInPlace libiio.rules.cmakein \
|
||||
--replace /bin/sh ${runtimeShell}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Move Python bindings into a separate output.
|
||||
moveToOutput ${python.sitePackages} "$python"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "API for interfacing with the Linux Industrial I/O Subsystem";
|
||||
homepage = "https://github.com/analogdevicesinc/libiio";
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
diff --git a/bindings/python/iio.py b/bindings/python/iio.py
|
||||
index 5306daa..f8962ee 100644
|
||||
--- a/bindings/python/iio.py
|
||||
+++ b/bindings/python/iio.py
|
||||
@@ -229,9 +229,9 @@ if "Windows" in _system():
|
||||
_iiolib = "libiio.dll"
|
||||
else:
|
||||
# Non-windows, possibly Posix system
|
||||
- _iiolib = "iio"
|
||||
+ _iiolib = "@libiio@"
|
||||
|
||||
-_lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
|
||||
+_lib = _cdll(_iiolib, use_errno=True, use_last_error=True)
|
||||
|
||||
_get_backends_count = _lib.iio_get_backends_count
|
||||
_get_backends_count.restype = c_uint
|
||||
diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
|
||||
index cd14e2e..516c409 100644
|
||||
--- a/bindings/python/setup.py.cmakein
|
||||
+++ b/bindings/python/setup.py.cmakein
|
||||
@@ -62,7 +62,7 @@ class InstallWrapper(install):
|
||||
_iiolib = "libiio.dll"
|
||||
else:
|
||||
# Non-windows, possibly Posix system
|
||||
- _iiolib = "iio"
|
||||
+ _iiolib = "@libiio@"
|
||||
try:
|
||||
import os
|
||||
|
||||
@@ -72,7 +72,7 @@ class InstallWrapper(install):
|
||||
fulllibpath = find_recursive(destdir, "libiio.so")
|
||||
_lib = _cdll(fulllibpath, use_errno=True, use_last_error=True)
|
||||
else:
|
||||
- _lib = _cdll(find_library(_iiolib), use_errno=True, use_last_error=True)
|
||||
+ _lib = _cdll(_iiolib, use_errno=True, use_last_error=True)
|
||||
if not _lib._name:
|
||||
raise OSError
|
||||
except OSError:
|
||||
Loading…
Add table
Add a link
Reference in a new issue