Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 44 lines 926 B view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 unittestCheckHook, 6 setuptools, 7}: 8 9buildPythonPackage rec { 10 pname = "cpufeature"; 11 version = "0.2.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "robbmcleod"; 16 repo = "cpufeature"; 17 tag = "v${version}"; 18 hash = "sha256-dp569Tp8E5/avQpYvhPNPgS/A+q2e/ie+7BR7h2Ip+I="; 19 }; 20 21 nativeBuildInputs = [ setuptools ]; 22 23 propagatedBuildInputs = [ setuptools ]; 24 25 nativeCheckInputs = [ unittestCheckHook ]; 26 27 pythonImportsCheck = [ "cpufeature" ]; 28 29 preCheck = '' 30 # Change into the test directory due to a relative resource path 31 cd cpufeature 32 ''; 33 34 meta = { 35 description = "Python module for detection of CPU features"; 36 homepage = "https://github.com/robbmcleod/cpufeature"; 37 license = lib.licenses.cc0; 38 maintainers = with lib.maintainers; [ fab ]; 39 platforms = [ 40 "x86_64-linux" 41 "x86_64-windows" 42 ]; 43 }; 44}