nushell: use newer libproc.h

This commit is contained in:
Weijia Wang 2023-02-16 17:50:14 +01:00
parent cdcfb1e18e
commit 453840daf1
2 changed files with 4 additions and 18 deletions

View file

@ -11,10 +11,9 @@
, python3
, xorg
, libiconv
, Libsystem
, AppKit
, Security
# darwin.apple_sdk.sdk
, sdk
, nghttp2
, libgit2
, withExtraFeatures ? true
@ -44,21 +43,8 @@ rustPlatform.buildRustPackage rec {
++ lib.optionals stdenv.isDarwin [ rustPlatform.bindgenHook ];
buildInputs = [ openssl zstd ]
++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ]
++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
(
# 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 stdenv.isDarwin [ zlib libiconv Libsystem Security ]
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ]
++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ];
buildFeatures = lib.optional withExtraFeatures "extra";

View file

@ -26228,8 +26228,8 @@ with pkgs;
nsh = callPackage ../shells/nsh { };
nushell = darwin.apple_sdk_11_0.callPackage ../shells/nushell {
inherit (darwin.apple_sdk_11_0) Libsystem;
inherit (darwin.apple_sdk_11_0.frameworks) AppKit Security;
inherit (darwin.apple_sdk) sdk;
};
nettools = if stdenv.isLinux