mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
commit
8ffbe13ec0
|
@ -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)" ];
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue