2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkgs,
|
|
|
|
setuptools,
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hwdata";
|
|
|
|
version = "2.4.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xsuchy";
|
|
|
|
repo = "python-hwdata";
|
|
|
|
rev = "python-hwdata-${version}-1";
|
|
|
|
hash = "sha256-hmvxVF9LOkezXnJdbtbEJWhU4uvUJgxQHYeWUoiniF0=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace hwdata.py --replace "/usr/share/hwdata" "${pkgs.hwdata}/share/hwdata"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "hwdata" ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
doCheck = false; # no tests
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings to hwdata";
|
|
|
|
homepage = "https://github.com/xsuchy/python-hwdata";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lurkki ];
|
|
|
|
};
|
|
|
|
}
|