nbstripout: fix build on darwin

This commit is contained in:
Jaakko Luttinen 2017-05-17 09:59:26 +03:00
parent fb19aac85d
commit 4a9acbb79a
No known key found for this signature in database
GPG Key ID: 7B1CE13152E6B964

View File

@ -1,4 +1,4 @@
{lib, python2Packages, git, mercurial}: {lib, python2Packages, git, mercurial, coreutils}:
with python2Packages; with python2Packages;
buildPythonApplication rec { buildPythonApplication rec {
@ -17,6 +17,12 @@ buildPythonApplication rec {
sha256 = "126xhjma4a0k7gq58hbqglhb3rai0a576azz7g8gmqjr3kl0264v"; sha256 = "126xhjma4a0k7gq58hbqglhb3rai0a576azz7g8gmqjr3kl0264v";
}; };
# for some reason, darwin uses /bin/sh echo native instead of echo binary, so
# force using the echo binary
postPatch = ''
substituteInPlace tests/test-git.t --replace "echo" "${coreutils}/bin/echo"
'';
# ignore flake8 tests for the nix wrapped setup.py # ignore flake8 tests for the nix wrapped setup.py
checkPhase = '' checkPhase = ''
PATH=$PATH:$out/bin:${mercurial}/bin pytest --ignore=nix_run_setup.py . PATH=$PATH:$out/bin:${mercurial}/bin pytest --ignore=nix_run_setup.py .