python312Packages.cynthion: init at 0.1.7

This commit is contained in:
Karolis Stasaitis 2024-11-13 09:17:12 +01:00
parent ded0edc6d9
commit 93b0565dd2
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,85 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
# build-system
setuptools,
# dependencies
amaranth,
apollo-fpga,
future,
libusb1,
luna-soc,
luna-usb,
prompt-toolkit,
pyfwup,
pygreat,
pyserial,
pyusb,
tabulate,
tomli,
tqdm,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "cynthion";
version = "0.1.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = "cynthion";
rev = "refs/tags/${version}";
hash = "sha256-2nVfODAg4t5hoSKUEP4IN23R+JGe3lw/rpfjW/UIsYw=";
};
sourceRoot = "${src.name}/cynthion/python";
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools-git-versioning<2"' "" \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
build-system = [
setuptools
];
dependencies = [
amaranth
apollo-fpga
future
libusb1
luna-soc
luna-usb
prompt-toolkit
pyfwup
pygreat
pyserial
pyusb
tabulate
tomli
tqdm
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "cynthion" ];
meta = {
changelog = "https://github.com/greatscottgadgets/cynthion/releases/tag/${version}";
description = "Python package and utilities for the Great Scott Gadgets Cynthion USB Test Instrument";
homepage = "https://github.com/greatscottgadgets/cynthion";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ carlossless ];
broken = lib.versionAtLeast amaranth.version "0.5";
};
}

View File

@ -2826,6 +2826,8 @@ self: super: with self; {
cymruwhois = callPackage ../development/python-modules/cymruwhois { };
cynthion = callPackage ../development/python-modules/cynthion { };
cypari2 = callPackage ../development/python-modules/cypari2 { };
cypherpunkpay = callPackage ../development/python-modules/cypherpunkpay { };