From dfc7bdb1a350a735a0d57d741ade1196652884e3 Mon Sep 17 00:00:00 2001 From: Sirio Balmelli Date: Fri, 20 Sep 2019 15:23:09 +0200 Subject: [PATCH] ycmd: install phase copies all dirs below 'third_party' Copy _all_ of 'third_party'. Cherry-picking the contents of this dir is a fragile approach as they change in later commits (breaking this build). This approach continues to work on the current build, and will not break with later versions of the project. Signed-off-by: Sirio Balmelli --- pkgs/development/tools/misc/ycmd/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/misc/ycmd/default.nix b/pkgs/development/tools/misc/ycmd/default.nix index 12f0b13a660..61f529e1108 100644 --- a/pkgs/development/tools/misc/ycmd/default.nix +++ b/pkgs/development/tools/misc/ycmd/default.nix @@ -51,16 +51,17 @@ stdenv.mkDerivation { mkdir -p $out/lib/ycmd/third_party/{gocode,godef,racerd/target/release} - for p in jedi waitress frozendict bottle parso python-future requests; do - cp -r third_party/$p $out/lib/ycmd/third_party - done + # Copy everything: the structure of third_party has been known to change. + # When linking our own libraries below, do so with '-f' + # to clobber anything we may have copied here. + cp -r third_party/* $out/lib/ycmd/third_party/ '' + lib.optionalString (gocode != null) '' - ln -s ${gocode}/bin/gocode $out/lib/ycmd/third_party/gocode + ln -sf ${gocode}/bin/gocode $out/lib/ycmd/third_party/gocode '' + lib.optionalString (godef != null) '' - ln -s ${godef}/bin/godef $out/lib/ycmd/third_party/godef + ln -sf ${godef}/bin/godef $out/lib/ycmd/third_party/godef '' + lib.optionalString (rustracerd != null) '' - ln -s ${rustracerd}/bin/racerd $out/lib/ycmd/third_party/racerd/target/release + ln -sf ${rustracerd}/bin/racerd $out/lib/ycmd/third_party/racerd/target/release ''; # fixup the argv[0] and replace __file__ with the corresponding path so