python312Packages.luna-usb: init at 0.1.2

This commit is contained in:
Karolis Stasaitis 2024-11-13 09:15:23 +01:00
parent de6f807a09
commit 393495aa44
2 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,75 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
# build-system
setuptools,
# dependencies
amaranth,
libusb1,
pyserial,
pyusb,
pyvcd,
usb-protocol,
# tests
pytestCheckHook,
apollo-fpga,
}:
buildPythonPackage rec {
pname = "luna-usb";
version = "0.1.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = "luna";
rev = "refs/tags/${version}";
hash = "sha256-T9V0rI6vcEpM3kN/duRni6v2plCU4B379Zx07dBGKjk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools-git-versioning<2"' "" \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
build-system = [
setuptools
];
dependencies = [
amaranth
libusb1
pyserial
pyusb
pyvcd
usb-protocol
];
nativeCheckInputs = [
pytestCheckHook
apollo-fpga
];
pytestFlagsArray = [
"tests/"
];
pythonImportsCheck = [
"luna"
];
meta = {
changelog = "https://github.com/greatscottgadgets/luna/releases/tag/${version}";
description = "Amaranth HDL framework for monitoring, hacking, and developing USB devices";
homepage = "https://github.com/greatscottgadgets/luna";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ carlossless ];
broken = lib.versionAtLeast amaranth.version "0.5";
};
}

View File

@ -7610,6 +7610,8 @@ self: super: with self; {
lunarcalendar = callPackage ../development/python-modules/lunarcalendar { };
luna-usb = callPackage ../development/python-modules/luna-usb { };
luqum = callPackage ../development/python-modules/luqum { };
luxor = callPackage ../development/python-modules/luxor { };