rust-analyzer: fix build on darwin

This commit is contained in:
Andrey Kuznetsov 2021-03-16 20:27:10 +04:00
parent 6af448d9e5
commit 18ff588551
No known key found for this signature in database
GPG key ID: A3748A3281F25743
3 changed files with 12 additions and 5 deletions

View file

@ -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 {} {

View file

@ -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;

View file

@ -11054,7 +11054,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 {