Merge pull request #178558 from StarGate01/pyanrfutil

authored by Sandro and committed by GitHub ec9cb321 85f8f070

+64
+62
pkgs/development/python-modules/adafruit-nrfutil/default.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , pythonOlder 6 + , pyserial 7 + , click 8 + , ecdsa 9 + , behave 10 + , nose 11 + }: 12 + 13 + buildPythonPackage rec { 14 + pname = "adafruit-nrfutil"; 15 + version = "0.5.3.post17"; 16 + format = "setuptools"; 17 + 18 + disabled = pythonOlder "3.7"; 19 + 20 + src = fetchFromGitHub { 21 + owner = "adafruit"; 22 + repo = "Adafruit_nRF52_nrfutil"; 23 + rev = version; 24 + sha256 = "sha256-mHHKOQE9AGBX8RAyaPOy+JS3fTs98+AFdq9qsVy7go4="; 25 + }; 26 + 27 + patches = [ 28 + # Pull a patch which fixes the tests, but is not yet released in a new version: 29 + # https://github.com/adafruit/Adafruit_nRF52_nrfutil/pull/38 30 + (fetchpatch { 31 + name = "fix-tests.patch"; 32 + url = "https://github.com/adafruit/Adafruit_nRF52_nrfutil/commit/e5fbcc8ee5958041db38c04139ba686bf7d1b845.patch"; 33 + sha256 = "sha256-0tbJldGtYcDdUzA3wZRv0lenXVn6dqV016U9nMpQ6/w="; 34 + }) 35 + ]; 36 + 37 + propagatedBuildInputs = [ 38 + pyserial 39 + click 40 + ecdsa 41 + ]; 42 + 43 + checkInputs = [ 44 + behave 45 + nose 46 + ]; 47 + 48 + preCheck = '' 49 + mkdir test-reports 50 + ''; 51 + 52 + pythonImportsCheck = [ 53 + "nordicsemi" 54 + ]; 55 + 56 + meta = with lib; { 57 + homepage = "https://github.com/adafruit/Adafruit_nRF52_nrfutil"; 58 + description = "Modified version of Nordic's nrfutil 0.5.x for use with the Adafruit Feather nRF52"; 59 + license = licenses.bsd3; 60 + maintainers = with maintainers; [ stargate01 ]; 61 + }; 62 + }
+2
pkgs/top-level/python-packages.nix
··· 171 171 172 172 adafruit-io = callPackage ../development/python-modules/adafruit-io { }; 173 173 174 + adafruit-nrfutil = callPackage ../development/python-modules/adafruit-nrfutil { }; 175 + 174 176 adafruit-platformdetect = callPackage ../development/python-modules/adafruit-platformdetect { }; 175 177 176 178 adafruit-pureio = callPackage ../development/python-modules/adafruit-pureio { };