at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pyusb, 7}: 8 9buildPythonPackage rec { 10 pname = "pygreat"; 11 version = "2024.0.5"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "greatscottgadgets"; 16 repo = "libgreat"; 17 tag = "v${version}"; 18 hash = "sha256-2PFeCG7m8qiK3eBX2838P6ZsLoQxcJBG+/TppUMT6dE="; 19 }; 20 21 sourceRoot = "${src.name}/host"; 22 23 postPatch = '' 24 substituteInPlace pyproject.toml \ 25 --replace-fail '"setuptools-git-versioning<2"' "" \ 26 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 27 ''; 28 29 pythonRemoveDeps = [ "backports.functools_lru_cache" ]; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ pyusb ]; 34 35 # Module has no tests 36 doCheck = false; 37 38 pythonImportsCheck = [ "pygreat" ]; 39 40 meta = { 41 description = "Python library for talking with libGreat devices"; 42 homepage = "https://github.com/greatscottgadgets/libgreat/"; 43 changelog = "https://github.com/greatscottgadgets/libgreat/releases/tag/${src.tag}"; 44 license = lib.licenses.bsd3; 45 maintainers = with lib.maintainers; [ carlossless ]; 46 }; 47}