Merge pull request #299596 from iFreilicht/fix-ycmd-build-failure-on-darwin

ycmd: Fix build on darwin
This commit is contained in:
Weijia Wang 2024-04-04 01:42:35 +02:00 committed by GitHub
commit 40f1dbb004
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 8 deletions

View File

@ -1,9 +1,20 @@
{ stdenv, lib, fetchFromGitHub, cmake, ninja, python
, withGodef ? true, godef
, withGotools? true, gotools
, withTypescript ? true, typescript
, abseil-cpp, boost, llvmPackages
, fixDarwinDylibNames, Cocoa
{ stdenv
, lib
, fetchFromGitHub
, cmake
, ninja
, python
, withGodef ? true
, godef
, withGotools ? true
, gotools
, withTypescript ? true
, typescript
, abseil-cpp
, boost
, llvmPackages
, fixDarwinDylibNames
, Cocoa
}:
stdenv.mkDerivation {
@ -23,7 +34,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake ninja ]
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = with python.pkgs; with llvmPackages; [ abseil-cpp boost libllvm.all libclang.all ]
++ [ jedi jedi-language-server pybind11 ]
++ [ jedi jedi-language-server pybind11 ]
++ lib.optional stdenv.isDarwin Cocoa;
buildPhase = ''
@ -45,6 +56,7 @@ stdenv.mkDerivation {
# symlink completion backends where ycmd expects them
installPhase = ''
rm -rf ycmd/tests
find third_party -type d -name "test" -exec rm -rf {} +
chmod +x ycmd/__main__.py
sed -i "1i #!${python.interpreter}\

View File

@ -20110,7 +20110,7 @@ with pkgs;
yams = callPackage ../applications/audio/yams { };
ycmd = callPackage ../development/tools/misc/ycmd {
ycmd = callPackage ../by-name/yc/ycmd/package.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
python = python3;
};