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 <sirio@b-ad.ch>
This commit is contained in:
Sirio Balmelli 2019-09-20 15:23:09 +02:00
parent 55d63efdc0
commit dfc7bdb1a3
No known key found for this signature in database
GPG key ID: 0437A96EFE4C426E

View file

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