2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
2024-07-31 10:19:44 +00:00
|
|
|
cmsis-svd,
|
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
future,
|
|
|
|
ipython,
|
2024-07-31 10:19:44 +00:00
|
|
|
lib,
|
|
|
|
prompt-toolkit,
|
|
|
|
pyfwup,
|
2024-06-05 15:53:02 +00:00
|
|
|
pygreat,
|
2024-07-31 10:19:44 +00:00
|
|
|
pythonOlder,
|
|
|
|
pyusb,
|
|
|
|
setuptools,
|
|
|
|
tabulate,
|
|
|
|
tqdm,
|
2024-06-05 15:53:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "greatfet";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "2024.0.2";
|
2024-07-31 10:19:44 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "greatscottgadgets";
|
|
|
|
repo = "greatfet";
|
2024-07-27 06:49:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-1GfyhxwA6Nhf/umvllR/hkh5hyn42141QOT7+6IGAis=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
sourceRoot = "${src.name}/host";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail ', "setuptools-git-versioning<2"' "" \
|
|
|
|
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
cmsis-svd
|
2024-06-05 15:53:02 +00:00
|
|
|
future
|
|
|
|
ipython
|
2024-07-31 10:19:44 +00:00
|
|
|
prompt-toolkit
|
|
|
|
pyfwup
|
2024-06-05 15:53:02 +00:00
|
|
|
pygreat
|
2024-07-31 10:19:44 +00:00
|
|
|
pyusb
|
|
|
|
tabulate
|
|
|
|
tqdm
|
2024-06-05 15:53:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
# Tests seem to require devices (or simulators) which are
|
|
|
|
# not available in the build sandbox.
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Hardware hacking with the greatfet";
|
|
|
|
homepage = "https://greatscottgadgets.com/greatfet";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.all;
|
2024-07-31 10:19:44 +00:00
|
|
|
mainProgram = "gf";
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
mog
|
|
|
|
msanft
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|