about summary refs log tree commit diff
path: root/pkgs/tools/system/btop
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-07-10 14:50:26 +0300
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-07-10 14:50:26 +0300
commit4dcd4c38e80d62fbd123caeadf16e9efc32c4130 (patch)
tree49c1dccfc7d27c269e0a768a89968ab12959a838 /pkgs/tools/system/btop
parentad2af572f89529232a6120464d86acc388296675 (diff)
btop: cleanup
Diffstat (limited to 'pkgs/tools/system/btop')
-rw-r--r--pkgs/tools/system/btop/default.nix23
1 files changed, 6 insertions, 17 deletions
diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix
index 1bde417e6dedf..b74089ae0a9a7 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)" ];