159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
52 lines
963 B
Nix
52 lines
963 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pyusb,
|
|
tqdm,
|
|
libusb1,
|
|
setuptools,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyfwup";
|
|
version = "0.5.2";
|
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "greatscottgadgets";
|
|
repo = "pyfwup";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-Kyc3f8beTg0W1+U7SvZuNPN1pdsco9rBUfoEtR7AI44=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail '"setuptools-git-versioning<2"' "" \
|
|
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
|
|
'';
|
|
|
|
dependencies = [
|
|
pyusb
|
|
tqdm
|
|
libusb1
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
pythonImportsCheck = [
|
|
"fwup"
|
|
"fwup_utils"
|
|
];
|
|
|
|
meta = {
|
|
description = "Python FirmWare UPgrader";
|
|
homepage = "https://github.com/greatscottgadgets/pyfwup";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ lib.maintainers.msanft ];
|
|
};
|
|
}
|