Files
nixpkgs/pkgs/development/python-modules/cpufeature/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

48 lines
974 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
unittestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "cpufeature";
version = "0.2.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "robbmcleod";
repo = "cpufeature";
tag = "v${version}";
hash = "sha256-dp569Tp8E5/avQpYvhPNPgS/A+q2e/ie+7BR7h2Ip+I=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ setuptools ];
nativeCheckInputs = [ unittestCheckHook ];
pythonImportsCheck = [ "cpufeature" ];
preCheck = ''
# Change into the test directory due to a relative resource path
cd cpufeature
'';
meta = {
description = "Python module for detection of CPU features";
homepage = "https://github.com/robbmcleod/cpufeature";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ fab ];
platforms = [
"x86_64-linux"
"x86_64-windows"
];
};
}