diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index 642f2e936e19..09e24775a351 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -1,4 +1,4 @@ -{ pkgs, callPackage }: +{ pkgs, callPackage, CoreServices }: { rust-analyzer-unwrapped = callPackage ./generic.nix rec { @@ -6,6 +6,8 @@ version = "unstable-${rev}"; sha256 = "150gydm0mg72bbhgjjks8qc5ldiqyzhai9z4yfh4f1s2bwdfh3yf"; cargoSha256 = "10l0lk5p11002q59dqa5yrrz6n6s11i7bmr1wnl141bxqvm873q2"; + + inherit CoreServices; }; rust-analyzer = callPackage ./wrapper.nix {} { diff --git a/pkgs/development/tools/rust/rust-analyzer/generic.nix b/pkgs/development/tools/rust/rust-analyzer/generic.nix index ecca83f89a4e..ddb834af6c38 100644 --- a/pkgs/development/tools/rust/rust-analyzer/generic.nix +++ b/pkgs/development/tools/rust/rust-analyzer/generic.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, darwin, cmake +{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake +, libiconv , useMimalloc ? false , doCheck ? true @@ -22,8 +23,10 @@ rustPlatform.buildRustPackage { nativeBuildInputs = lib.optional useMimalloc cmake; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin - [ darwin.apple_sdk.frameworks.CoreServices ]; + buildInputs = lib.optionals stdenv.isDarwin [ + CoreServices + libiconv + ]; RUST_ANALYZER_REV = rev; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03fcbd4d1012..58f3bead93b4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11082,7 +11082,9 @@ in rustracerd = callPackage ../development/tools/rust/racerd { inherit (darwin.apple_sdk.frameworks) Security; }; - inherit (callPackage ../development/tools/rust/rust-analyzer { }) + inherit (callPackage ../development/tools/rust/rust-analyzer { + inherit (darwin.apple_sdk.frameworks) CoreServices; + }) rust-analyzer-unwrapped rust-analyzer; rust-bindgen = callPackage ../development/tools/rust/bindgen { }; rust-cbindgen = callPackage ../development/tools/rust/cbindgen {