0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge branch 'staging-next' into staging

This commit is contained in:
Jan Tojnar 2021-03-06 19:56:45 +01:00
commit 1465e8e397
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
45 changed files with 3069 additions and 1050 deletions

View file

@ -1,8 +1,10 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, pytestCheckHook
, sysctl
}:
buildPythonPackage rec {
@ -33,6 +35,13 @@ buildPythonPackage rec {
pytestCheckHook
];
# On Darwin sysctl is used to read CPU information.
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace cpuinfo/cpuinfo.py \
--replace "len(_program_paths('sysctl')) > 0" "True" \
--replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'"
'';
meta = {
description = "Get CPU info with pure Python 2 & 3";
longDescription = ''