aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/misc/nrfutil/default.nix
blob: 0a6155e649e59e053ce02e5988659b8bf495d462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, python2Packages, fetchFromGitHub }:

with python2Packages; buildPythonApplication rec {
  pname = "nrfutil";
  version = "5.2.0";

  src = fetchFromGitHub {
    owner = "NordicSemiconductor";
    repo = "pc-nrfutil";
    rev = "v${version}";
    sha256 = "1hajjgz8r4fjbwqr22p5dvb6k83dpxf8k7mhx20gkbrrx9ivqh79";
  };

  propagatedBuildInputs = [ pc-ble-driver-py six pyserial enum34 click ecdsa
    protobuf tqdm piccata pyspinel intelhex pyyaml crcmod libusb1 ipaddress ];

  checkInputs = [ nose behave ];

  postPatch = ''
    # remove version bound on pyyaml
    sed -i /pyyaml/d requirements.txt

    mkdir test-reports
  '';

  meta = with stdenv.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 ];
  };
}