at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 pyusb, 7 pyserial, 8 prompt-toolkit, 9 libusb1, 10 setuptools, 11}: 12 13buildPythonPackage rec { 14 pname = "facedancer"; 15 version = "3.1.1"; 16 pyproject = true; 17 disabled = pythonOlder "3.10"; 18 19 src = fetchFromGitHub { 20 owner = "greatscottgadgets"; 21 repo = "facedancer"; 22 tag = version; 23 hash = "sha256-Qe8DPUKwlukPftc7SOZIcY/do/14UdS61WH0g5dFeMI="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail '"setuptools-git-versioning<2"' "" \ 29 --replace-fail 'dynamic = ["version"]' 'version = "${version}"' 30 ''; 31 32 build-system = [ 33 setuptools 34 ]; 35 36 dependencies = [ 37 pyusb 38 pyserial 39 prompt-toolkit 40 libusb1 41 ]; 42 43 pythonImportsCheck = [ 44 "facedancer" 45 ]; 46 47 meta = { 48 changelog = "https://github.com/greatscottgadgets/facedancer/releases/tag/${src.tag}"; 49 description = "Implement your own USB device in Python, supported by a hardware peripheral such as Cynthion or GreatFET"; 50 homepage = "https://github.com/greatscottgadgets/facedancer"; 51 license = lib.licenses.bsd3; 52 maintainers = with lib.maintainers; [ 53 mog 54 carlossless 55 ]; 56 }; 57}