From 131d9e53a2e49b02f4996edde25936b6d8cc270a Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 19 May 2019 12:12:32 +0200 Subject: [PATCH] nrfutil: init at 5.2.0 --- .../tools/misc/nrfutil/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/tools/misc/nrfutil/default.nix diff --git a/pkgs/development/tools/misc/nrfutil/default.nix b/pkgs/development/tools/misc/nrfutil/default.nix new file mode 100644 index 000000000000..0a6155e649e5 --- /dev/null +++ b/pkgs/development/tools/misc/nrfutil/default.nix @@ -0,0 +1,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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ac9475e2780..26cd39388bb0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9397,6 +9397,8 @@ in noweb = callPackage ../development/tools/literate-programming/noweb { }; nuweb = callPackage ../development/tools/literate-programming/nuweb { tex = texlive.combined.scheme-small; }; + nrfutil = callPackage ../development/tools/misc/nrfutil { }; + obelisk = callPackage ../development/tools/ocaml/obelisk { }; obuild = callPackage ../development/tools/ocaml/obuild { };