about summary refs log tree commit diff
path: root/pkgs/by-name/ad
diff options
context:
space:
mode:
authorChristoph Honal <christoph.honal@web.de>2023-11-20 21:19:25 +0100
committerChristoph Honal <christoph.honal@web.de>2023-11-20 21:19:25 +0100
commitd5308456a65c1b4c14c33d6b2bdae5c6384285c3 (patch)
tree8b695a8d10bfcad03acfaae914786c8078b526f9 /pkgs/by-name/ad
parenteb0037836a5cf0eda3360ca5c2c6655f72a83018 (diff)
python3Packages.adafruit-nrfutil: fix tests
Diffstat (limited to 'pkgs/by-name/ad')
-rw-r--r--pkgs/by-name/ad/adafruit-nrfutil/package.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/by-name/ad/adafruit-nrfutil/package.nix b/pkgs/by-name/ad/adafruit-nrfutil/package.nix
index 64dc160ff1fbc..a521154aa253a 100644
--- a/pkgs/by-name/ad/adafruit-nrfutil/package.nix
+++ b/pkgs/by-name/ad/adafruit-nrfutil/package.nix
@@ -1,6 +1,7 @@
 { lib
 , python3Packages
 , fetchFromGitHub
+, fetchpatch
 }:
 
 python3Packages.buildPythonApplication rec {
@@ -15,6 +16,16 @@ python3Packages.buildPythonApplication rec {
     hash = "sha256-mHHKOQE9AGBX8RAyaPOy+JS3fTs98+AFdq9qsVy7go4=";
   };
 
+  patches = [
+    # Pull a patch which fixes the tests, but is not yet released in a new version:
+    # https://github.com/adafruit/Adafruit_nRF52_nrfutil/pull/38
+    (fetchpatch {
+      name = "fix-tests.patch";
+      url = "https://github.com/adafruit/Adafruit_nRF52_nrfutil/commit/e5fbcc8ee5958041db38c04139ba686bf7d1b845.patch";
+      sha256 = "sha256-0tbJldGtYcDdUzA3wZRv0lenXVn6dqV016U9nMpQ6/w=";
+    })
+  ];
+
   nativeBuildInputs = with python3Packages; [
     setuptools
   ];
@@ -28,6 +39,7 @@ python3Packages.buildPythonApplication rec {
   nativeCheckInputs = with python3Packages; [
     behave
     nose
+    pytestCheckHook
   ];
 
   preCheck = ''