about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix b/nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix
index 77280835fe06..b09aaa9c3b3e 100644
--- a/nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix
+++ b/nixpkgs/pkgs/tools/misc/cc2538-bsl/default.nix
@@ -1,8 +1,9 @@
-{ lib, fetchFromGitHub, python3Packages }:
+{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
 
 python3Packages.buildPythonPackage rec {
   pname = "cc2538-bsl";
   version = "unstable-2022-08-03";
+  format = "setuptools";
 
   src = fetchFromGitHub rec {
     owner = "JelmerT";
@@ -11,7 +12,20 @@ python3Packages.buildPythonPackage rec {
     hash = "sha256-fPY12kValxbJORi9xNyxzwkGpD9F9u3M1+aa9IlSiaE=";
   };
 
-  nativeBuildInputs = [ python3Packages.setuptools-scm ];
+  patches = [
+    # https://github.com/JelmerT/cc2538-bsl/pull/138
+    (fetchpatch {
+      name = "clean-up-install-dependencies.patch";
+      url = "https://github.com/JelmerT/cc2538-bsl/commit/bf842adf8e99a9eb8528579e5b85e59ee23be08d.patch";
+      hash = "sha256-XKQ0kfl8yFrSF5RosHY9OvJR18Fh0dmAN1FlfZ024ME=";
+    })
+  ];
+
+  env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.1.dev0+g${lib.substring 0 7 src.rev}";
+
+  nativeBuildInputs = with python3Packages; [
+    setuptools-scm
+  ];
 
   propagatedBuildInputs = with python3Packages; [
     intelhex
@@ -19,7 +33,10 @@ python3Packages.buildPythonPackage rec {
     python-magic
   ];
 
-  env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.1.dev0+g${lib.substring 0 7 src.rev}";
+  nativeCheckInputs = with python3Packages; [
+    pytestCheckHook
+    scripttest
+  ];
 
   postInstall = ''
     # Remove .py from binary