diff --git a/default.nix b/default.nix index 4565454..f93187b 100644 --- a/default.nix +++ b/default.nix @@ -74,6 +74,7 @@ let }); in pkgs.python3Packages.buildPythonPackage rec { pname = "tockloader"; + pyproject = true; version = let pattern = "^__version__ = ['\"]([^'\"]*)['\"]\n"; in elemAt (match pattern (readFile ./tockloader/_version.py)) 0; @@ -90,6 +91,7 @@ in pkgs.python3Packages.buildPythonPackage rec { pycrypto siphash ecdsa + flit-core ] ++ (lib.optional withUnfreePkgs pynrfjprog); src = ./.; @@ -98,8 +100,7 @@ in pkgs.python3Packages.buildPythonPackage rec { doCheck = withUnfreePkgs; # Make other dependencies explicitly available as passthru attributes - passthru = { - inherit nrf-command-line-tools; - pynrfjprog = python3Packages.pynrfjprog; - }; + passthru = if withUnfreePkgs then { + inherit pynrfjprog nrf-command-line-tools; + } else { }; } diff --git a/pyproject.toml b/pyproject.toml index 8fe704d..e25b1ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ dependencies = [ "crcmod >= 1.7", "ecdsa >= 0.19.1", "pycryptodome >= 3.15.0", - "pynrfjprog == 10.19.0", "pyserial >= 3.0.1", "siphash >= 0.0.1", "six >= 1.9.0", @@ -24,6 +23,9 @@ dependencies = [ "tqdm >= 4.45.0 ", "questionary >= 1.10.0", ] +optional-delendencies = [ + "pynrfjprog == 10.22.1", +] [project.urls] Home = "https://github.com/tock/tockloader" diff --git a/requirements.txt b/requirements.txt index 783780d..aab07d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ colorama==0.4.6 crcmod==1.7 ecdsa==0.19.1 pycryptodome==3.22.0 -pynrfjprog==10.19.0 +pynrfjprog==10.22.1 pyserial==3.5 questionary==2.1.0 setuptools==78.1.1