at master 1.3 kB view raw
1{ 2 buildPythonPackage, 3 cmsis-svd, 4 fetchFromGitHub, 5 future, 6 ipython, 7 lib, 8 prompt-toolkit, 9 pyfwup, 10 pygreat, 11 pythonOlder, 12 pyusb, 13 setuptools, 14 tabulate, 15 tqdm, 16}: 17 18buildPythonPackage rec { 19 pname = "greatfet"; 20 version = "2024.0.4"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "greatscottgadgets"; 27 repo = "greatfet"; 28 tag = "v${version}"; 29 hash = "sha256-3ClM4UzVIDEkVBrFwzvLokbxUHXqdQWyNVqcFtiXCOQ="; 30 }; 31 32 sourceRoot = "${src.name}/host"; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace-fail ', "setuptools-git-versioning<2"' "" \ 37 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 38 ''; 39 40 build-system = [ setuptools ]; 41 42 pythonRelaxDeps = [ "ipython" ]; 43 44 dependencies = [ 45 cmsis-svd 46 future 47 ipython 48 prompt-toolkit 49 pyfwup 50 pygreat 51 pyusb 52 tabulate 53 tqdm 54 ]; 55 56 # Tests seem to require devices (or simulators) which are 57 # not available in the build sandbox. 58 doCheck = false; 59 60 meta = { 61 description = "Hardware hacking with the greatfet"; 62 homepage = "https://greatscottgadgets.com/greatfet"; 63 license = lib.licenses.bsd3; 64 platforms = lib.platforms.all; 65 mainProgram = "gf"; 66 maintainers = with lib.maintainers; [ 67 mog 68 msanft 69 ]; 70 }; 71}