1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix
2023-03-17 13:01:56 +02:00

56 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, python3
}:
with python3.pkgs;
buildPythonApplication rec {
pname = "nrfutil";
version = "6.1.7";
src = fetchFromGitHub {
owner = "NordicSemiconductor";
repo = "pc-nrfutil";
rev = "refs/tags/v${version}";
sha256 = "sha256-WiXqeQObhXszDcLxJN8ABd2ZkxsOUvtZQSVP8cYlT2M=";
};
propagatedBuildInputs = [
click
crcmod
ecdsa
libusb1
intelhex
pc-ble-driver-py
piccata
protobuf
pyserial
pyspinel
pyyaml
tqdm
];
nativeCheckInputs = [
behave
nose
];
# Workaround: pythonRelaxDepsHook doesn't work for this.
postPatch = ''
mkdir test-reports
substituteInPlace requirements.txt \
--replace "libusb1==1.9.3" "libusb1" \
--replace "protobuf >=3.17.3, < 4.0.0" "protobuf"
'';
meta = with lib; {
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 ];
};
}