nushell: Include Apple SDK for libproc.h / bindgen
9b6b817276
https://github.com/andrewdavidmackenzie/libproc-rs/releases/tag/v0.12.0fec8b61321/pkgs/development/libraries/webkitgtk/default.nix (L161-L166)
fec8b61321/pkgs/tools/system/btop/default.nix (L32-L37)
This commit is contained in:
parent
0d117eb087
commit
c0d73cf864
@ -1,6 +1,7 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, runCommand
|
||||
, rustPlatform
|
||||
, openssl
|
||||
, zlib
|
||||
@ -10,7 +11,10 @@
|
||||
, xorg
|
||||
, libiconv
|
||||
, AppKit
|
||||
, Foundation
|
||||
, Security
|
||||
# darwin.apple_sdk.sdk
|
||||
, sdk
|
||||
, nghttp2
|
||||
, libgit2
|
||||
, withExtraFeatures ? true
|
||||
@ -40,7 +44,21 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = [ openssl zstd ]
|
||||
++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ]
|
||||
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ]
|
||||
++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
Foundation
|
||||
(
|
||||
# Pull a header that contains a definition of proc_pid_rusage().
|
||||
# (We pick just that one because using the other headers from `sdk` is not
|
||||
# compatible with our C++ standard library. This header is already in
|
||||
# the standard library on aarch64)
|
||||
# See also:
|
||||
# https://github.com/shanesveller/nixpkgs/tree/90ed23b1b23c8ee67928937bdec7ddcd1a0050f5/pkgs/development/libraries/webkitgtk/default.nix
|
||||
# https://github.com/shanesveller/nixpkgs/blob/90ed23b1b23c8ee67928937bdec7ddcd1a0050f5/pkgs/tools/system/btop/default.nix#L32-L38
|
||||
runCommand "${pname}_headers" { } ''
|
||||
install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h
|
||||
''
|
||||
)
|
||||
] ++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ]
|
||||
++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ];
|
||||
|
||||
buildFeatures = lib.optional withExtraFeatures "extra";
|
||||
|
@ -24470,7 +24470,8 @@ with pkgs;
|
||||
nsh = callPackage ../shells/nsh { };
|
||||
|
||||
nushell = callPackage ../shells/nushell {
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit Security;
|
||||
inherit (darwin.apple_sdk.frameworks) AppKit Foundation Security;
|
||||
inherit (darwin.apple_sdk) sdk;
|
||||
};
|
||||
|
||||
nettools = if stdenv.isLinux
|
||||
|
Loading…
Reference in New Issue
Block a user