-
-
Save reckenrode/f46d0ee15694a1bd3fc4323b3b58be76 to your computer and use it in GitHub Desktop.
psutil with the new pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pkgs/development/python-modules/psutil/default.nix b/pkgs/development/python-modules/psutil/default.nix | |
| index 4c0a93d2faa4..6930cec32fbe 100644 | |
| --- a/pkgs/development/python-modules/psutil/default.nix | |
| +++ b/pkgs/development/python-modules/psutil/default.nix | |
| @@ -1,10 +1,9 @@ | |
| { | |
| lib, | |
| stdenv, | |
| + apple-sdk_12, | |
| buildPythonPackage, | |
| - CoreFoundation, | |
| fetchPypi, | |
| - IOKit, | |
| pytestCheckHook, | |
| python, | |
| pythonOlder, | |
| @@ -24,18 +23,7 @@ buildPythonPackage rec { | |
| hash = "sha256-j6rk8xC22Wn6JsoFRTOLIfc8axXbfEqNk0pUgvqoGPI="; | |
| }; | |
| - postPatch = '' | |
| - # stick to the old SDK name for now | |
| - # https://developer.apple.com/documentation/iokit/kiomasterportdefault/ | |
| - # https://developer.apple.com/documentation/iokit/kiomainportdefault/ | |
| - substituteInPlace psutil/arch/osx/cpu.c \ | |
| - --replace-fail kIOMainPortDefault kIOMasterPortDefault | |
| - ''; | |
| - | |
| - buildInputs = | |
| - # workaround for https://github.com/NixOS/nixpkgs/issues/146760 | |
| - lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ CoreFoundation ] | |
| - ++ lib.optionals stdenv.isDarwin [ IOKit ]; | |
| + buildInputs = lib.optionals stdenv.isDarwin [ apple-sdk_12 ]; | |
| nativeCheckInputs = [ pytestCheckHook ]; | |
| diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix | |
| index cf49725db571..efb3ce2c4b43 100644 | |
| --- a/pkgs/top-level/python-packages.nix | |
| +++ b/pkgs/top-level/python-packages.nix | |
| @@ -10850,10 +10850,7 @@ self: super: with self; { | |
| psd-tools = callPackage ../development/python-modules/psd-tools { }; | |
| - psutil = callPackage ../development/python-modules/psutil { | |
| - stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv; | |
| - inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation IOKit; | |
| - }; | |
| + psutil = callPackage ../development/python-modules/psutil { }; | |
| psutil-home-assistant = callPackage ../development/python-modules/psutil-home-assistant { }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment