Skip to content

Commit

Permalink
Merge pull request #248614 from tjni/cc2538-bsl
Browse files Browse the repository at this point in the history
cc2538-bsl: clean up dependencies and enable tests
  • Loading branch information
NickCao authored Aug 13, 2023
2 parents 7b56683 + 59e66c1 commit 6fe67db
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions pkgs/tools/misc/cc2538-bsl/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -11,15 +12,31 @@ 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
pyserial
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
Expand Down

0 comments on commit 6fe67db

Please sign in to comment.