From 3ca74495d211408286564b140badd3631089d4ab Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sun, 4 Sep 2016 14:11:15 +0000 Subject: [PATCH] xapianBindings: fix calls to sphinx-bulid in python bindings Makefile --- .../development/libraries/xapian/bindings/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/xapian/bindings/default.nix b/pkgs/development/libraries/xapian/bindings/default.nix index 4db6e57546ae..7187f9b575fd 100644 --- a/pkgs/development/libraries/xapian/bindings/default.nix +++ b/pkgs/development/libraries/xapian/bindings/default.nix @@ -23,6 +23,17 @@ composableDerivation.composableDerivation {} rec { name = "python"; enable = { buildInputs = [ python sphinx ]; + + # Our `sphinx-build` binary is a shell wrapper around + # `sphinx-build` python code. Makefile tries to execute it + # using python2 and fails. Fixing that here. + patchPhase = '' + for a in python/Makefile* ; do + substituteInPlace $a \ + --replace '$(PYTHON2) $(SPHINX_BUILD)' '$(SPHINX_BUILD)' + done + ''; + # export same env vars as in pythonNew preConfigure = '' export PYTHON_LIB=$out/lib/${python.libPrefix}/site-packages