Merge pull request #242638 from wegank/btop-cleanup

btop: cleanup
This commit is contained in:
Weijia Wang 2023-07-10 16:32:20 +03:00 committed by GitHub
commit 8ffbe13ec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 18 deletions

View file

@ -1,7 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, runCommand
, darwin , darwin
, removeReferencesTo , removeReferencesTo
}: }:
@ -17,23 +16,13 @@ stdenv.mkDerivation rec {
hash = "sha256-F/muCjhcnM+VqAn6FlD4lv23OLITrmtnHkFc5zv97yk="; hash = "sha256-F/muCjhcnM+VqAn6FlD4lv23OLITrmtnHkFc5zv97yk=";
}; };
ADDFLAGS = with darwin.apple_sdk.frameworks; buildInputs = lib.optionals stdenv.isDarwin [
lib.optional stdenv.isDarwin darwin.apple_sdk_11_0.frameworks.CoreFoundation
"-F${IOKit}/Library/Frameworks/"; darwin.apple_sdk_11_0.frameworks.IOKit
];
buildInputs = with darwin.apple_sdk; env.ADDFLAGS = lib.optionalString stdenv.isDarwin
lib.optionals stdenv.isDarwin [ "-F${darwin.apple_sdk_11_0.frameworks.IOKit}/Library/Frameworks/";
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
''
);
installFlags = [ "PREFIX=$(out)" ]; installFlags = [ "PREFIX=$(out)" ];

View file

@ -27355,7 +27355,7 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) AppKit; inherit (darwin.apple_sdk.frameworks) AppKit;
}; };
btop = callPackage ../tools/system/btop { btop = darwin.apple_sdk_11_0.callPackage ../tools/system/btop {
stdenv = gcc12Stdenv; stdenv = gcc12Stdenv;
}; };