Merge pull request #93063 from jonas-schievink/nrfutil

This commit is contained in:
Gabriel Ebner 2020-07-13 23:30:08 +02:00 committed by GitHub
commit 5f8c1a224b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 38 deletions

View File

@ -3959,6 +3959,12 @@
githubId = 4611077;
name = "Raymond Gauthier";
};
jschievink = {
email = "jonasschievink@gmail.com";
github = "jonas-schievink";
githubId = 1786438;
name = "Jonas Schievink";
};
jtcoolen = {
email = "jtcoolen@pm.me";
name = "Julien Coolen";

View File

@ -0,0 +1,28 @@
{ stdenv, fetchFromGitHub, git, cmake, catch2, asio, udev }:
stdenv.mkDerivation rec {
pname = "pc-ble-driver";
version = "4.1.1";
src = fetchFromGitHub {
owner = "NordicSemiconductor";
repo = "pc-ble-driver";
rev = "v${version}";
sha256 = "1llhkpbdbsq9d91m873vc96bprkgpb5wsm5fgs1qhzdikdhg077q";
};
cmakeFlags = [
"-DNRF_BLE_DRIVER_VERSION=${version}"
];
nativeBuildInputs = [ cmake git ];
buildInputs = [ catch2 asio udev ];
meta = with stdenv.lib; {
description = "Desktop library for Bluetooth low energy development";
homepage = "https://github.com/NordicSemiconductor/pc-ble-driver";
license = licenses.unfreeRedistributable;
platforms = platforms.unix;
maintainers = with maintainers; [ jschievink ];
};
}

View File

@ -1,45 +1,25 @@
{ stdenv, buildPythonPackage, fetchpatch, fetchFromGitHub,
python, cmake, git, swig, boost, udev,
setuptools, enum34, wrapt, future }:
{ stdenv, fetchFromGitHub, cmake, git, swig, boost, udev, pc-ble-driver
, buildPythonPackage, enum34, wrapt, future, setuptools, scikit-build }:
buildPythonPackage rec {
pname = "pc-ble-driver-py";
version = "0.11.4";
disabled = python.isPy3k;
version = "0.14.2";
src = fetchFromGitHub {
owner = "NordicSemiconductor";
repo = "pc-ble-driver-py";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "0lgmcnrlcivmawmlcwnn4pdp6afdbnf3fyfgq22xzs6v72m9gp81";
sha256 = "1zbi3v4jmgq1a3ml34dq48y1hinw2008vwqn30l09r5vqvdgnj8m";
};
nativeBuildInputs = [ cmake swig git setuptools ];
buildInputs = [ boost udev ];
# doCheck tries to write to the global python directory to install things
doCheck = false;
nativeBuildInputs = [ cmake swig git setuptools scikit-build ];
buildInputs = [ boost udev pc-ble-driver ];
propagatedBuildInputs = [ enum34 wrapt future ];
patches = [
# build system expects case-insensitive file system
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/NordicSemiconductor/pc-ble-driver-py/pull/84.patch";
sha256 = "0ibx5g2bndr5h9sfnx51bk9b62q4jvpdwhxadbnj3da8kvcz13cy";
})
];
postPatch = ''
# do not force static linking of boost
sed -i /Boost_USE_STATIC_LIBS/d pc-ble-driver/cmake/*.cmake
cd python
'';
preBuild = ''
pushd ../build
cmake ..
make -j $NIX_BUILD_CORES
popd
'';
dontUseCmakeConfigure = true;
meta = with stdenv.lib; {
description = "Bluetooth Low Energy nRF5 SoftDevice serialization";

View File

@ -1,25 +1,22 @@
{ stdenv, python2Packages, fetchFromGitHub }:
{ stdenv, python37Packages, fetchFromGitHub }:
with python2Packages; buildPythonApplication rec {
with python37Packages; buildPythonApplication rec {
pname = "nrfutil";
version = "5.2.0";
version = "6.1";
src = fetchFromGitHub {
owner = "NordicSemiconductor";
repo = "pc-nrfutil";
rev = "v${version}";
sha256 = "1hajjgz8r4fjbwqr22p5dvb6k83dpxf8k7mhx20gkbrrx9ivqh79";
sha256 = "0g43lf5jmk0qxb7r4h68wr38fli6pjjk67w8l2cpdm9rd8jz4lpn";
};
propagatedBuildInputs = [ pc-ble-driver-py six pyserial enum34 click ecdsa
propagatedBuildInputs = [ pc-ble-driver-py six pyserial enum34 click ecdsa
protobuf tqdm piccata pyspinel intelhex pyyaml crcmod libusb1 ipaddress ];
checkInputs = [ nose behave ];
postPatch = ''
# remove version bound on pyyaml
sed -i /pyyaml/d requirements.txt
mkdir test-reports
'';

View File

@ -21354,6 +21354,8 @@ in
partio = callPackage ../development/libraries/partio {};
pc-ble-driver = callPackage ../development/libraries/pc-ble-driver {};
pbis-open = callPackage ../tools/security/pbis { };
pcmanfm = callPackage ../applications/misc/pcmanfm { };