git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #142657 from fabaff/nrfutil

nrfutil: 6.1 -> 6.1.3

commit0398f79c295cb3c267952121a63f0a02b44f713d authorFabian Affolter <fabian@affolter-engineering.ch> dateSun 24 Oct 2021, 09:59 (5 years ago) parent9941cc405b4013
4 files changed+128−33
pkgs/development/python-modules/pc-ble-driver-py/default.nix+44−11 pkgs/development/python-modules/piccata/default.nix+20−6 pkgs/development/python-modules/pyspinel/default.nix+15−9 pkgs/development/tools/misc/nrfutil/default.nix+49−7
pkgs/development/python-modules/pc-ble-driver-py/default.nix+44−11
@@ -1,27 +1,60 @@
1−{ lib, fetchFromGitHub, cmake, git, swig, boost, udev, pc-ble-driver, pythonOlder
2−, buildPythonPackage, enum34, wrapt, future, setuptools, scikit-build, pythonAtLeast }:
1+{ lib
2+, boost
3+, buildPythonPackage
4+, cmake
5+, cryptography
6+, fetchFromGitHub
7+, git
8+, pc-ble-driver
9+, pythonAtLeast
10+, pythonOlder
11+, scikit-build
12+, setuptools
13+, swig
14+, udev
15+, wrapt
16+}:
317
418buildPythonPackage rec {
519 pname = "pc-ble-driver-py";
6− version = "0.15.0";
7− disabled = pythonOlder "3.6" || pythonAtLeast "3.9";
20+ version = "0.16.1";
21+
22+ disabled = pythonOlder "3.7" || pythonAtLeast "3.10";
823
924 src = fetchFromGitHub {
1025 owner = "NordicSemiconductor";
1126 repo = "pc-ble-driver-py";
12− rev = version;
13− sha256 = "1ckbsq9dwca8hpx9frf9xd80b4z4kn9j7jx94hza9bwzrh26x5ji";
27+ rev = "v${version}";
28+ sha256 = "0q2zag77drcjkjm0cbvy2sf6fq2a4yl5li1zv1xfwmy53ami9b5l";
1429 };
1530
16− # doCheck tries to write to the global python directory to install things
17− doCheck = false;
31+ nativeBuildInputs = [
32+ cmake
33+ swig
34+ git
35+ setuptools
36+ scikit-build
37+ ];
38+
39+ buildInputs = [
40+ boost
41+ pc-ble-driver
42+ ];
1843
19− nativeBuildInputs = [ cmake swig git setuptools scikit-build ];
20− buildInputs = [ boost pc-ble-driver ];
21− propagatedBuildInputs = [ enum34 wrapt future ];
44+ propagatedBuildInputs = [
45+ cryptography
46+ wrapt
47+ ];
2248
2349 dontUseCmakeConfigure = true;
2450
51+ # doCheck tries to write to the global python directory to install things
52+ doCheck = false;
53+
54+ pythonImportsCheck = [
55+ "pc_ble_driver_py"
56+ ];
57+
2558 meta = with lib; {
2659 description = "Bluetooth Low Energy nRF5 SoftDevice serialization";
2760 homepage = "https://github.com/NordicSemiconductor/pc-ble-driver-py";
pkgs/development/python-modules/piccata/default.nix+20−6
@@ -1,8 +1,14 @@
1−{ buildPythonPackage, isPy27, fetchFromGitHub, lib, ipaddress }:
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, isPy27
5+, pytestCheckHook
6+}:
27
38buildPythonPackage rec {
49 pname = "piccata";
510 version = "2.0.0";
11+
612 disabled = isPy27;
713
814 src = fetchFromGitHub {
@@ -12,15 +18,23 @@ buildPythonPackage rec {
1218 sha256 = "0pn842jcf2czjks5dphivgp1s7wiifqiv93s0a89h0wxafd6pbsr";
1319 };
1420
15− propagatedBuildInputs = [
16− ipaddress
21+ checkInputs = [
22+ pytestCheckHook
23+ ];
24+
25+ disabledTests = [
26+ # No communication possible in the sandbox
27+ "test_client_server_communication"
1728 ];
1829
19− pythonImportsCheck = [ "piccata" ];
30+ pythonImportsCheck = [
31+ "piccata"
32+ ];
2033
21− meta = {
34+ meta = with lib; {
2235 description = "Simple CoAP (RFC7252) toolkit";
2336 homepage = "https://github.com/NordicSemiconductor/piccata";
24− maintainers = with lib.maintainers; [ gebner ];
37+ license = licenses.mit;
38+ maintainers = with maintainers; [ gebner ];
2539 };
2640}
pkgs/development/python-modules/pyspinel/default.nix+15−9
@@ -1,27 +1,33 @@
1−{ lib, buildPythonPackage, fetchFromGitHub, isPy27
2−, future, pyserial, ipaddress
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pyserial
5+, pythonOlder
36}:
47
58buildPythonPackage rec {
69 pname = "pyspinel";
7− version = "unstable-2020-06-19"; # no versioned release since 2018
8− disabled = isPy27;
10+ version = "unstable-2021-08-19";
11+
12+ disabled = pythonOlder "3.7";
913
1014 src = fetchFromGitHub {
1115 owner = "openthread";
1216 repo = pname;
13− rev = "e0bb3f8e6f49b593ab248a75de04a71626ae8101";
14− sha256 = "0nfmdkgbhmkl82dfxjpwiiarxngm6a3fvdrzpaqp60a4b17pipqg";
17+ rev = "50d104e29eacd92d229f0b7179ec1067f5851c17";
18+ sha256 = "0s2r00zb909cq3dd28i91qbl0nz8cga3g98z84gq5jqkjpiy8269";
1519 };
1620
1721 propagatedBuildInputs = [
18− future
19− ipaddress
2022 pyserial
2123 ];
2224
25+ # Tests are out-dated
2326 doCheck = false;
24− pythonImportsCheck = [ "spinel" ];
27+
28+ pythonImportsCheck = [
29+ "spinel"
30+ ];
2531
2632 meta = with lib; {
2733 description = "Interface to the OpenThread Network Co-Processor (NCP)";
pkgs/development/tools/misc/nrfutil/default.nix+49−7
@@ -1,20 +1,62 @@
1−{ lib, python3Packages, fetchFromGitHub }:
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, pkgs
5+, python3
6+, python3Packages
7+}:
8+let
9+ py = python3.override {
10+ packageOverrides = self: super: {
211
3−with python3Packages; buildPythonApplication rec {
12+ libusb1 = super.libusb1.overridePythonAttrs (oldAttrs: rec {
13+ version = "1.9.3";
14+ src = oldAttrs.src.override {
15+ inherit version;
16+ sha256 = "0j8p7jb7sibiiib18vyv3w5rrk0f4d2dl99bs18nwkq6pqvwxrk0";
17+ };
18+
19+ postPatch = ''
20+ substituteInPlace usb1/libusb1.py --replace \
21+ "ctypes.util.find_library(base_name)" \
22+ "'${pkgs.libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
23+ '';
24+ });
25+ };
26+ };
27+in
28+with py.pkgs;
29+
30+buildPythonApplication rec {
431 pname = "nrfutil";
5− version = "6.1";
32+ version = "6.1.3";
633
734 src = fetchFromGitHub {
835 owner = "NordicSemiconductor";
936 repo = "pc-nrfutil";
1037 rev = "v${version}";
11− sha256 = "0g43lf5jmk0qxb7r4h68wr38fli6pjjk67w8l2cpdm9rd8jz4lpn";
38+ sha256 = "1gpxjdcjn4rjvk649vpkh563c7lx3rrfvamazb1qjii1pxrvvqa7";
1239 };
1340
14− propagatedBuildInputs = [ pc-ble-driver-py six pyserial enum34 click ecdsa
15− protobuf tqdm piccata pyspinel intelhex pyyaml crcmod libusb1 ipaddress ];
41+ propagatedBuildInputs = [
42+ click
43+ crcmod
44+ ecdsa
45+ libusb1
46+ intelhex
47+ pc-ble-driver-py
48+ piccata
49+ protobuf
50+ pyserial
51+ pyspinel
52+ pyyaml
53+ tqdm
54+ ];
1655
17− checkInputs = [ nose behave ];
56+ checkInputs = [
57+ behave
58+ nose
59+ ];
1860
1961 postPatch = ''
2062 mkdir test-reports