Skip to content

Commit

Permalink
python312Packages.cynthion: init at 0.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossless committed Nov 13, 2024
1 parent 4468377 commit dbdf14d
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
86 changes: 86 additions & 0 deletions pkgs/development/python-modules/cynthion/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
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 ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
broken = lib.versionAtLeast amaranth.version "0.5";
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit dbdf14d

Please sign in to comment.