Merge pull request #238630 from StepBroBD/metawear

python3Packages.metawear: init at 1.0.8
This commit is contained in:
Sandro 2023-07-12 00:10:35 +02:00 committed by GitHub
commit c0ee74baac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, gcc
, cython
, boost
, bluez
, nlohmann_json
, pyserial
, requests
, warble
}:
buildPythonPackage rec {
pname = "metawear";
version = "1.0.8";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-gNEI6P6GslNd1DzFwCFndVIfUvSTPYollGdqkZhQ4Y8=";
};
nativeBuildInputs = [
cython
];
buildInputs = [
boost
bluez
nlohmann_json
];
postPatch = ''
# remove vendored nlohmann_json
rm MetaWear-SDK-Cpp/src/metawear/dfu/cpp/json.hpp
substituteInPlace MetaWear-SDK-Cpp/src/metawear/dfu/cpp/file_operations.cpp \
--replace '#include "json.hpp"' '#include <nlohmann/json.hpp>'
'';
propagatedBuildInputs = [
pyserial
requests
warble
];
enableParallelBuilding = true;
pythonImportsCheck = [ "mbientlab" "mbientlab.metawear" ];
meta = with lib; {
description = "Python bindings for the MetaWear C++ SDK by MbientLab";
homepage = "https://github.com/mbientlab/metawear-sdk-python";
license = with licenses; [ unfree ];
maintainers = with maintainers; [ stepbrobd ];
platforms = platforms.linux;
};
}

View File

@ -6343,6 +6343,8 @@ self: super: with self; {
metar = callPackage ../development/python-modules/metar { };
metawear = callPackage ../development/python-modules/metawear { };
meteoalertapi = callPackage ../development/python-modules/meteoalertapi { };
meteocalc = callPackage ../development/python-modules/meteocalc { };