2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
with python3.pkgs;
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nrfutil";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "6.1.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NordicSemiconductor";
|
|
|
|
repo = "pc-nrfutil";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-UiGNNJxNSpIzpeYMlzocLG2kuetl8xti5A3n6zz0lcY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
crcmod
|
|
|
|
ecdsa
|
|
|
|
libusb1
|
|
|
|
intelhex
|
|
|
|
pc-ble-driver-py
|
|
|
|
piccata
|
|
|
|
protobuf
|
|
|
|
pyserial
|
|
|
|
pyspinel
|
|
|
|
pyyaml
|
|
|
|
tqdm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
checkInputs = [
|
|
|
|
behave
|
|
|
|
nose
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
mkdir test-reports
|
2022-08-12 12:06:08 +00:00
|
|
|
substituteInPlace requirements.txt --replace "libusb1==1.9.3" "libusb1"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Device Firmware Update tool for nRF chips";
|
|
|
|
homepage = "https://github.com/NordicSemiconductor/pc-nrfutil";
|
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|