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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,68 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, substituteAll
# build
, pkg-config
, glibc
, python
# runtime
, bluez
, boost
, glib
}:
let
pname = "gattlib";
version = "unstable-2021-06-16";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
src = fetchFromGitHub {
owner = "oscaracena";
repo = "pygattlib";
rev = "7bdb229124fe7d9f4a2cc090277b0fdef82e2a56";
hash = "sha256-PS5DIH1JuH2HweyebLLM+UNFGY/XsjKIrsD9x7g7yMI=";
};
patches = [
(substituteAll {
src = ./setup.patch;
boost_version = let
pythonVersion = with lib.versions; "${major python.version}${minor python.version}";
in
"boost_python${pythonVersion}";
})
];
nativeBuildInputs = [
pkg-config
glibc
];
buildInputs = [
bluez
boost
glib
];
# has no tests
doCheck = false;
pythonImportsCheck = [
"gattlib"
];
meta = with lib; {
description = "Python library to use the GATT Protocol for Bluetooth LE devices";
homepage = "https://github.com/oscaracena/pygattlib";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View file

@ -0,0 +1,18 @@
diff --git a/setup.py b/setup.py
index 0825241..389a59e 100755
--- a/setup.py
+++ b/setup.py
@@ -11,12 +11,7 @@ extension_modules = []
def get_boost_version(out=None):
- if out is None:
- out = subprocess.check_output(
- r"ldconfig -p | grep -E 'libboost_python.*\.so '", shell=True)
-
- ver = os.path.splitext(out.split()[0][3:])[0].decode()
- return ver
+ return "@boost_version@"
def tests():
# case: python3-py3x.so