mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
pyusb,
|
|
pyserial,
|
|
prompt-toolkit,
|
|
libusb1,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "facedancer";
|
|
version = "3.0.4";
|
|
pyproject = true;
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "greatscottgadgets";
|
|
repo = "facedancer";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-Cl6cohelJkpr2Nokfwwm7GQIg7ZipPL3v44JVWsHUNI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail '"setuptools-git-versioning<2"' "" \
|
|
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
|
|
'';
|
|
|
|
build-system = [
|
|
setuptools
|
|
];
|
|
|
|
dependencies = [
|
|
pyusb
|
|
pyserial
|
|
prompt-toolkit
|
|
libusb1
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"facedancer"
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/greatscottgadgets/facedancer/releases/tag/${version}";
|
|
description = "Implement your own USB device in Python, supported by a hardware peripheral such as Cynthion or GreatFET";
|
|
homepage = "https://github.com/greatscottgadgets/facedancer";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [
|
|
mog
|
|
carlossless
|
|
];
|
|
};
|
|
}
|