42 lines
803 B
Nix
42 lines
803 B
Nix
let
|
|
version_hash."v1.1.0" = "sha256-W6qxZThRbwiuKpmavUBzCNs6E3nS2hpMSFHmga6wPTA=";
|
|
in {
|
|
lib,
|
|
version ? "v1.1.0",
|
|
python3,
|
|
python3Packages,
|
|
fetchFromGitHub,
|
|
}: let
|
|
git = fetchFromGitHub {
|
|
owner = "NessieCircuits";
|
|
repo = "Riotee_ProbeSoftware";
|
|
rev = version;
|
|
hash = version_hash.${version} or "";
|
|
};
|
|
dependencies = with python3Packages; [
|
|
numpy
|
|
intelhex
|
|
click
|
|
pyserial
|
|
progress
|
|
pyocd
|
|
];
|
|
in python3Packages.buildPythonPackage {
|
|
pname = "riotee-probe";
|
|
version = version;
|
|
|
|
format = "pyproject";
|
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
flit-core
|
|
] ++ dependencies;
|
|
|
|
inherit dependencies;
|
|
|
|
src = "${git}/tool";
|
|
|
|
postFixup = ''
|
|
mkdir -p $out/lib/udev/rules.d
|
|
cp ${git}/52-riotee.rules $out/lib/udev/rules.d
|
|
'';
|
|
}
|