at 23.11-beta 55 lines 1.1 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, python3 5}: 6 7with python3.pkgs; 8 9buildPythonApplication rec { 10 pname = "nrfutil"; 11 version = "6.1.7"; 12 13 src = fetchFromGitHub { 14 owner = "NordicSemiconductor"; 15 repo = "pc-nrfutil"; 16 rev = "refs/tags/v${version}"; 17 sha256 = "sha256-WiXqeQObhXszDcLxJN8ABd2ZkxsOUvtZQSVP8cYlT2M="; 18 }; 19 20 propagatedBuildInputs = [ 21 click 22 crcmod 23 ecdsa 24 libusb1 25 intelhex 26 pc-ble-driver-py 27 piccata 28 protobuf 29 pyserial 30 pyspinel 31 pyyaml 32 tqdm 33 ]; 34 35 nativeCheckInputs = [ 36 behave 37 nose 38 ]; 39 40 # Workaround: pythonRelaxDepsHook doesn't work for this. 41 postPatch = '' 42 mkdir test-reports 43 substituteInPlace requirements.txt \ 44 --replace "libusb1==1.9.3" "libusb1" \ 45 --replace "protobuf >=3.17.3, < 4.0.0" "protobuf" 46 ''; 47 48 meta = with lib; { 49 description = "Device Firmware Update tool for nRF chips"; 50 homepage = "https://github.com/NordicSemiconductor/pc-nrfutil"; 51 license = licenses.unfreeRedistributable; 52 platforms = platforms.unix; 53 maintainers = with maintainers; [ gebner ]; 54 }; 55}