- wrap-python.nix used to set sys.argv[0] to the name of the script, but
it now sets the path so we won't have to do it here anymore
- tests were not found, so the correct file is now invoked
Certain programs, like zim, calibre and now also apparently mercurial,
rely on sys.argv[0] providing not just the script name but the full
path.
The Python docs [1] state the following on the matter:
> argv[0] is the script name (it is operating system dependent whether
this is a full pathname or not).
Therefore, scripts should not expect to receive a full path.
Unfortunately some do. While this can be considered a bug, there doesn't
seem any reason not to provide the full path. Therefore we now provide
the full path.
[1]
https://docs.python.org/3.5/library/sys.html?highlight=sys.argv#sys.argv
1) Replace --system-libclang with an explicit setting for the path to
nix libclang 3.9. Otherwise it will find system's libclang on darwin.
2) Remove clang/llvm from build inputs. This prevents ycm itself from
being compiled by clang 3.9. stdenv's standard compiler (gcc or
clang 3.7) will suffice.
3) Enable C++11 again as #16212 is caused by incopatibility between
clang 3.9 and libc++ 3.7, but we don't compile YCM with clang 3.9, so
this is not needed anymore.
tox/detox are removed; they are used to test multiple python
implementations in parallel, which isn't really appropriate for a Nix
install check. Also, because these were added to the propagated build
inputs, lots of unnecessary stuff ended up in the resulting closure.
Note that removing tox does not imply tests are not run; they never were
to begin with; this is a separate issue.
This fixes https://github.com/NixOS/nixpkgs/issues/16171
Also, for "correctness" ordinary build-time dependencies are added to
`buildInputs`; only inputs that are to be added to the python path are
added to `propagatedBuildInputs`.