Do not use top-level buildPythonPackage or buildPythonApplication

but instead use the one in pythonPackages.
This commit is contained in:
Frederik Rietdijk
2016-09-26 11:09:25 +02:00
parent 2f4da5bd83
commit 3ba16c8234
22 changed files with 68 additions and 83 deletions

View File

@@ -1,8 +1,11 @@
{ stdenv, fetchgit, cmake, python, llvmPackages, boost, pythonPackages, buildPythonApplication, makeWrapper
{ stdenv, fetchgit, cmake, python, llvmPackages, boost, pythonPackages
}:
stdenv.mkDerivation rec {
let
inherit (pythonPackages) python;
in pythonPackages.mkPythonDerivation rec {
name = "ycmd-2016-01-12";
namePrefix = "";
src = fetchgit {
url = "git://github.com/Valloric/ycmd.git";
@@ -10,13 +13,13 @@ stdenv.mkDerivation rec {
sha256 = "1g0hivv3wla7z5dgnkcn3ny38p089pjfj36nx6k29zmprgmjinyr";
};
buildInputs = [ python cmake boost makeWrapper ];
buildInputs = [ cmake boost ];
propagatedBuildInputs = with pythonPackages; [ waitress frozendict bottle ];
buildPhase = ''
export EXTRA_CMAKE_ARGS=-DPATH_TO_LLVM_ROOT=${llvmPackages.clang-unwrapped}
python build.py --clang-completer --system-boost
${python.interpreter} build.py --clang-completer --system-boost
'';
configurePhase = ":";
@@ -24,8 +27,6 @@ stdenv.mkDerivation rec {
installPhase = with pythonPackages; ''
mkdir -p $out/lib/ycmd/third_party $out/bin
cp -r ycmd/ CORE_VERSION libclang.so.* ycm_client_support.so ycm_core.so $out/lib/ycmd/
wrapProgram $out/lib/ycmd/ycmd/__main__.py \
--prefix PYTHONPATH : "$(toPythonPath ${waitress}):$(toPythonPath ${frozendict}):$(toPythonPath ${bottle})"
ln -s $out/lib/ycmd/ycmd/__main__.py $out/bin/ycmd
'';