2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
with python3Packages; buildPythonApplication rec {
|
|
|
|
pname = "tinyprog";
|
|
|
|
# `python setup.py --version` from repo checkout
|
|
|
|
version = "1.0.24.dev114+g${lib.substring 0 7 src.rev}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tinyfpga";
|
|
|
|
repo = "TinyFPGA-Bootloader";
|
|
|
|
rev = "97f6353540bf7c0d27f5612f202b48f41da75299";
|
|
|
|
sha256 = "0zbrvvb957z2lwbfd39ixqdsnd2w4wfjirwkqdrqm27bjz308731";
|
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/programmer";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyserial
|
|
|
|
jsonmerge
|
|
|
|
intelhex
|
|
|
|
tqdm
|
|
|
|
six
|
|
|
|
packaging
|
|
|
|
setuptools
|
|
|
|
pyusb
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tinyfpga/TinyFPGA-Bootloader/tree/master/programmer";
|
|
|
|
description = "Programmer for FPGA boards using the TinyFPGA USB Bootloader";
|
|
|
|
maintainers = with maintainers; [ emily ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|