Files
nixpkgs/pkgs/development/python-modules/hwdata/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

38 lines
788 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pkgs,
setuptools,
}:
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=";
};
nativeBuildInputs = [ setuptools ];
patchPhase = ''
substituteInPlace hwdata.py --replace "/usr/share/hwdata" "${pkgs.hwdata}/share/hwdata"
'';
pythonImportsCheck = [ "hwdata" ];
doCheck = false; # no tests
meta = {
description = "Python bindings to hwdata";
homepage = "https://github.com/xsuchy/python-hwdata";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ lurkki ];
};
}