nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-23 12:49:11 +00:00
{ lib
, stdenv
, fetchFromGitHub
, python3
}:
2019-05-19 10:12:32 +00:00
with python3.pkgs;
2021-10-23 12:49:11 +00:00
buildPythonApplication rec {
2019-05-19 10:12:32 +00:00
pname = "nrfutil";
version = "6.1.6";
2019-05-19 10:12:32 +00:00
src = fetchFromGitHub {
owner = "NordicSemiconductor";
repo = "pc-nrfutil";
rev = "v${version}";
sha256 = "sha256-UiGNNJxNSpIzpeYMlzocLG2kuetl8xti5A3n6zz0lcY=";
2019-05-19 10:12:32 +00:00
};
2021-10-23 12:49:11 +00:00
propagatedBuildInputs = [
click
crcmod
ecdsa
libusb1
intelhex
pc-ble-driver-py
piccata
protobuf
pyserial
pyspinel
pyyaml
tqdm
];
2019-05-19 10:12:32 +00:00
nativeCheckInputs = [
2021-10-23 12:49:11 +00:00
behave
nose
];
2019-05-19 10:12:32 +00:00
2022-10-08 18:12:11 +00:00
# Workaround: pythonRelaxDepsHook doesn't work for this.
2019-05-19 10:12:32 +00:00
postPatch = ''
mkdir test-reports
2022-10-08 18:12:11 +00:00
substituteInPlace requirements.txt \
--replace "libusb1==1.9.3" "libusb1" \
--replace "protobuf >=3.17.3, < 4.0.0" "protobuf"
2019-05-19 10:12:32 +00:00
'';
meta = with lib; {
2019-05-19 10:12:32 +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 ];
};
}