nushell: fix build on darwin

This commit is contained in:
Joaquín Triñanes 2024-10-21 09:58:23 +02:00
parent 9455dd1c9d
commit fa25edac5b
No known key found for this signature in database
GPG Key ID: 6E1446DD451C6BAF
3 changed files with 14 additions and 4 deletions

View File

@ -7,7 +7,7 @@ lib.makeScope newScope (self: with self; {
query = callPackage ./query.nix { inherit IOKit CoreFoundation; };
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
net = callPackage ./net.nix { inherit IOKit CoreFoundation; };
units = callPackage ./units.nix { };
highlight = callPackage ./highlight.nix { };
units = callPackage ./units.nix { inherit IOKit Foundation; };
highlight = callPackage ./highlight.nix { inherit IOKit Foundation; };
dbus = callPackage ./dbus.nix { inherit dbus; nushell_plugin_dbus = self.dbus; };
})

View File

@ -5,6 +5,8 @@
pkg-config,
nix-update-script,
fetchFromGitHub,
IOKit,
Foundation,
}:
rustPlatform.buildRustPackage rec {
@ -20,7 +22,10 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-VHx+DLS+v4p++KI+ZLzJpFk4A5Omwy6E0vJ/lgP3pC0=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
];
cargoBuildFlags = [ "--package nu_plugin_highlight" ];
checkPhase = ''

View File

@ -5,6 +5,8 @@
pkg-config,
nix-update-script,
fetchFromGitHub,
IOKit,
Foundation,
}:
rustPlatform.buildRustPackage rec {
@ -20,7 +22,10 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-pxA+6E5luFHq/N0K/8Xk2LapwDnPqDUEpTYqP/jcc3s=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
];
cargoBuildFlags = [ "--package nu_plugin_units" ];
passthru.updateScript = nix-update-script { };