1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pkgs,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "hwdata";
11 version = "2.4.1";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "xsuchy";
16 repo = "python-hwdata";
17 rev = "python-hwdata-${version}-1";
18 hash = "sha256-hmvxVF9LOkezXnJdbtbEJWhU4uvUJgxQHYeWUoiniF0=";
19 };
20
21 nativeBuildInputs = [ setuptools ];
22
23 patchPhase = ''
24 substituteInPlace hwdata.py --replace "/usr/share/hwdata" "${pkgs.hwdata}/share/hwdata"
25 '';
26
27 pythonImportsCheck = [ "hwdata" ];
28
29 doCheck = false; # no tests
30
31 meta = with lib; {
32 description = "Python bindings to hwdata";
33 homepage = "https://github.com/xsuchy/python-hwdata";
34 license = licenses.gpl2Plus;
35 maintainers = with maintainers; [ lurkki ];
36 };
37}