1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 pythonOlder, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 luna-usb, 12}: 13 14buildPythonPackage rec { 15 pname = "luna-soc"; 16 version = "0.2.2"; 17 pyproject = true; 18 disabled = pythonOlder "3.8"; 19 20 src = fetchFromGitHub { 21 owner = "greatscottgadgets"; 22 repo = "luna-soc"; 23 tag = version; 24 hash = "sha256-fP2Pg0H/Aj3nFP0WG1yZjfZMqLutLwmibTohWUbgG34="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace-fail '"setuptools-git-versioning<2"' "" \ 30 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 31 ''; 32 33 build-system = [ 34 setuptools 35 ]; 36 37 dependencies = [ luna-usb ]; 38 39 # has no tests 40 doCheck = false; 41 42 pythonImportsCheck = [ 43 "luna_soc" 44 ]; 45 46 meta = { 47 changelog = "https://github.com/greatscottgadgets/luna-soc/releases/tag/${src.tag}"; 48 description = "Amaranth HDL library for building USB-capable SoC designs"; 49 homepage = "https://github.com/greatscottgadgets/luna-soc"; 50 license = lib.licenses.bsd3; 51 maintainers = with lib.maintainers; [ carlossless ]; 52 }; 53}