Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / metawear / default.nix
blob96f8c9434500a747d3cb9057ac5c03e0585f1815
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchPypi
5 , gcc
6 , cython
7 , boost
8 , bluez
9 , nlohmann_json
10 , pyserial
11 , requests
12 , warble
15 buildPythonPackage rec {
16   pname = "metawear";
17   version = "1.0.8";
18   format = "setuptools";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-gNEI6P6GslNd1DzFwCFndVIfUvSTPYollGdqkZhQ4Y8=";
23   };
25   nativeBuildInputs = [
26     cython
27   ];
29   buildInputs = [
30     boost
31     bluez
32     nlohmann_json
33   ];
35   postPatch = ''
36     # remove vendored nlohmann_json
37     rm MetaWear-SDK-Cpp/src/metawear/dfu/cpp/json.hpp
38     substituteInPlace MetaWear-SDK-Cpp/src/metawear/dfu/cpp/file_operations.cpp \
39         --replace '#include "json.hpp"' '#include <nlohmann/json.hpp>'
40   '';
42   propagatedBuildInputs = [
43     pyserial
44     requests
45     warble
46   ];
48   enableParallelBuilding = true;
50   pythonImportsCheck = [ "mbientlab" "mbientlab.metawear" ];
52   meta = with lib; {
53     description = "Python bindings for the MetaWear C++ SDK by MbientLab";
54     homepage = "https://github.com/mbientlab/metawear-sdk-python";
55     license = with licenses; [ unfree ];
56     maintainers = with maintainers; [ stepbrobd ];
57     platforms = platforms.linux;
58   };