rls: fix darwin build
rls links to internal rustc crates, which introduces an atypical dependency on rustc. A superficial installCheck ensures that the binary is linked properly and able to run on its own.
This commit is contained in:
parent
e84e223c9b
commit
40020f46b6
@ -19,6 +19,9 @@ rustPlatform.buildRustPackage rec {
|
|||||||
# a nightly compiler is required unless we use this cheat code.
|
# a nightly compiler is required unless we use this cheat code.
|
||||||
RUSTC_BOOTSTRAP=1;
|
RUSTC_BOOTSTRAP=1;
|
||||||
|
|
||||||
|
# rls-rustc links to rustc_private crates
|
||||||
|
CARGO_BUILD_RUSTFLAGS = if stdenv.isDarwin then "-C rpath" else null;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig cmake ];
|
nativeBuildInputs = [ pkgconfig cmake ];
|
||||||
buildInputs = [ openssh openssl curl zlib libiconv ]
|
buildInputs = [ openssh openssl curl zlib libiconv ]
|
||||||
++ (stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
|
++ (stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
|
||||||
@ -29,6 +32,11 @@ rustPlatform.buildRustPackage rec {
|
|||||||
rm tests/client.rs
|
rm tests/client.rs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
installCheckPhase = ''
|
||||||
|
$out/bin/rls --version
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Rust Language Server - provides information about Rust programs to IDEs and other tools";
|
description = "Rust Language Server - provides information about Rust programs to IDEs and other tools";
|
||||||
homepage = https://github.com/rust-lang/rls/;
|
homepage = https://github.com/rust-lang/rls/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user