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