diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index 1bde417e6ded..b74089ae0a9a 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, runCommand , darwin , removeReferencesTo }: @@ -17,23 +16,13 @@ stdenv.mkDerivation rec { hash = "sha256-F/muCjhcnM+VqAn6FlD4lv23OLITrmtnHkFc5zv97yk="; }; - ADDFLAGS = with darwin.apple_sdk.frameworks; - lib.optional stdenv.isDarwin - "-F${IOKit}/Library/Frameworks/"; + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.CoreFoundation + darwin.apple_sdk_11_0.frameworks.IOKit + ]; - buildInputs = with darwin.apple_sdk; - lib.optionals stdenv.isDarwin [ - frameworks.CoreFoundation - frameworks.IOKit - ] ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) ( - # Found this explanation for needing to create a header directory for libproc.h alone. - # https://github.com/NixOS/nixpkgs/blob/049e5e93af9bbbe06b4c40fd001a4e138ce1d677/pkgs/development/libraries/webkitgtk/default.nix#L154 - # TL;DR, the other headers in the include path for the macOS SDK is not compatible with the C++ stdlib and causes issues, so we copy - # this to avoid those issues - runCommand "${pname}_headers" { } '' - install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h - '' - ); + env.ADDFLAGS = lib.optionalString stdenv.isDarwin + "-F${darwin.apple_sdk_11_0.frameworks.IOKit}/Library/Frameworks/"; installFlags = [ "PREFIX=$(out)" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d0e2e0cdc18..9ba36420e943 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27355,7 +27355,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit; }; - btop = callPackage ../tools/system/btop { + btop = darwin.apple_sdk_11_0.callPackage ../tools/system/btop { stdenv = gcc12Stdenv; };