xonsh: 0.4.3 -> 0.5.12

This commit is contained in:
Joerg Thalheim 2017-11-21 00:08:50 +00:00
parent d5b02278c6
commit 1af0254fc7

View file

@ -2,39 +2,34 @@
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "xonsh-${version}"; name = "xonsh-${version}";
version = "0.4.3"; version = "0.5.12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "scopatz"; owner = "scopatz";
repo = "xonsh"; repo = "xonsh";
rev = version; rev = version;
sha256= "1lx95i468px908y18fa9fmfgmjsydhkpas89dxbwfnybqxxyd3ls"; sha256= "1s733ay5vcpcl14x23n0amnddyjfla55irddalvw52vijhd2aljz";
}; };
## The logo xonsh prints during build contains unicode characters, and this LC_ALL = "en_US.UTF-8";
## fails because locales have not been set up in the build environment. postPatch = ''
## We can fix this on Linux by setting:
## export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive
## but this would not be a cross platform solution, so it's simpler to just
## patch the setup.py script to not print the logo during build.
#prePatch = ''
# substituteInPlace setup.py --replace "print(logo)" ""
#'';
patchPhase = ''
rm xonsh/winutils.py rm xonsh/winutils.py
sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
sed -ie 's|test_win_ipconfig|_test_win_ipconfig|g' tests/test_execer.py sed -ie "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
sed -ie 's|test_ipconfig|_test_ipconfig|g' tests/test_execer.py sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' scripts/xon.sh
rm tests/test_main.py
rm tests/test_man.py patchShebangs .
rm tests/test_replay.py
''; '';
checkPhase = '' checkPhase = ''
HOME=$TMPDIR XONSH_INTERACTIVE=0 nosetests -x HOME=$TMPDIR XONSH_INTERACTIVE=0 \
pytest \
-k 'not test_man_completion and not test_printfile and not test_sourcefile and not test_printname ' \
tests
''; '';
buildInputs = with python3Packages; [ glibcLocales nose pytest ]; checkInputs = with python3Packages; [ pytest glibcLocales ];
propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ]; propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ];
meta = with stdenv.lib; { meta = with stdenv.lib; {