Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ in pkgs.python3Packages.buildPythonPackage rec {
in elemAt (match pattern (readFile ./tockloader/_version.py)) 0;
name = "${pname}-${version}";

pyproject = true;

nativeBuildInputs = with python3Packages; [
flit
];

propagatedBuildInputs = with python3Packages; [
argcomplete
colorama
Expand All @@ -98,8 +104,8 @@ in pkgs.python3Packages.buildPythonPackage rec {
doCheck = withUnfreePkgs;

# Make other dependencies explicitly available as passthru attributes
passthru = {
passthru = if withUnfreePkgs then {
inherit nrf-command-line-tools;
pynrfjprog = python3Packages.pynrfjprog;
};
} else { };
Comment on lines -101 to +110
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alevy I don't think we need this change. We're just exposing the unfree packages for convenience here, and passthru is ignored for regular package builds. Because of Nix's lazy eval, you wouldn't need to pull in any unfree dependencies for Tockloader alone, even if we unconditionally expose these packages here.

In other words, withUnfreePkgs should really only influence Tockloader's build inputs alone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean... it was failing for me without that I think? But sure, can revert my commit

}
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -25,6 +24,11 @@ dependencies = [
"questionary >= 1.10.0",
]

[project.optional-dependencies]
nrfjprog = [
"pynrfjprog >= 10.19.0",
]

[project.urls]
Home = "https://github.com/tock/tockloader"

Expand Down