Merge pull request #93063 from jonas-schievink/nrfutil
This commit is contained in:
commit
5f8c1a224b
@ -3959,6 +3959,12 @@
|
|||||||
githubId = 4611077;
|
githubId = 4611077;
|
||||||
name = "Raymond Gauthier";
|
name = "Raymond Gauthier";
|
||||||
};
|
};
|
||||||
|
jschievink = {
|
||||||
|
email = "jonasschievink@gmail.com";
|
||||||
|
github = "jonas-schievink";
|
||||||
|
githubId = 1786438;
|
||||||
|
name = "Jonas Schievink";
|
||||||
|
};
|
||||||
jtcoolen = {
|
jtcoolen = {
|
||||||
email = "jtcoolen@pm.me";
|
email = "jtcoolen@pm.me";
|
||||||
name = "Julien Coolen";
|
name = "Julien Coolen";
|
||||||
|
28
pkgs/development/libraries/pc-ble-driver/default.nix
Normal file
28
pkgs/development/libraries/pc-ble-driver/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,45 +1,25 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchpatch, fetchFromGitHub,
|
{ stdenv, fetchFromGitHub, cmake, git, swig, boost, udev, pc-ble-driver
|
||||||
python, cmake, git, swig, boost, udev,
|
, buildPythonPackage, enum34, wrapt, future, setuptools, scikit-build }:
|
||||||
setuptools, enum34, wrapt, future }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pc-ble-driver-py";
|
pname = "pc-ble-driver-py";
|
||||||
version = "0.11.4";
|
version = "0.14.2";
|
||||||
disabled = python.isPy3k;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "NordicSemiconductor";
|
owner = "NordicSemiconductor";
|
||||||
repo = "pc-ble-driver-py";
|
repo = "pc-ble-driver-py";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
fetchSubmodules = true;
|
sha256 = "1zbi3v4jmgq1a3ml34dq48y1hinw2008vwqn30l09r5vqvdgnj8m";
|
||||||
sha256 = "0lgmcnrlcivmawmlcwnn4pdp6afdbnf3fyfgq22xzs6v72m9gp81";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake swig git setuptools ];
|
# doCheck tries to write to the global python directory to install things
|
||||||
buildInputs = [ boost udev ];
|
doCheck = false;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake swig git setuptools scikit-build ];
|
||||||
|
buildInputs = [ boost udev pc-ble-driver ];
|
||||||
propagatedBuildInputs = [ enum34 wrapt future ];
|
propagatedBuildInputs = [ enum34 wrapt future ];
|
||||||
|
|
||||||
patches = [
|
dontUseCmakeConfigure = true;
|
||||||
# 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
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Bluetooth Low Energy nRF5 SoftDevice serialization";
|
description = "Bluetooth Low Energy nRF5 SoftDevice serialization";
|
||||||
|
@ -1,25 +1,22 @@
|
|||||||
{ stdenv, python2Packages, fetchFromGitHub }:
|
{ stdenv, python37Packages, fetchFromGitHub }:
|
||||||
|
|
||||||
with python2Packages; buildPythonApplication rec {
|
with python37Packages; buildPythonApplication rec {
|
||||||
pname = "nrfutil";
|
pname = "nrfutil";
|
||||||
version = "5.2.0";
|
version = "6.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "NordicSemiconductor";
|
owner = "NordicSemiconductor";
|
||||||
repo = "pc-nrfutil";
|
repo = "pc-nrfutil";
|
||||||
rev = "v${version}";
|
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 ];
|
protobuf tqdm piccata pyspinel intelhex pyyaml crcmod libusb1 ipaddress ];
|
||||||
|
|
||||||
checkInputs = [ nose behave ];
|
checkInputs = [ nose behave ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# remove version bound on pyyaml
|
|
||||||
sed -i /pyyaml/d requirements.txt
|
|
||||||
|
|
||||||
mkdir test-reports
|
mkdir test-reports
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -21354,6 +21354,8 @@ in
|
|||||||
|
|
||||||
partio = callPackage ../development/libraries/partio {};
|
partio = callPackage ../development/libraries/partio {};
|
||||||
|
|
||||||
|
pc-ble-driver = callPackage ../development/libraries/pc-ble-driver {};
|
||||||
|
|
||||||
pbis-open = callPackage ../tools/security/pbis { };
|
pbis-open = callPackage ../tools/security/pbis { };
|
||||||
|
|
||||||
pcmanfm = callPackage ../applications/misc/pcmanfm { };
|
pcmanfm = callPackage ../applications/misc/pcmanfm { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user