2016-06-04 17:05:12 +01:00
|
|
|
{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils }:
|
2015-03-26 18:25:17 +00:00
|
|
|
|
2016-02-19 12:12:11 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2015-03-26 18:25:17 +00:00
|
|
|
name = "xonsh-${version}";
|
2017-11-26 10:21:45 +00:00
|
|
|
version = "0.6.0";
|
2015-03-26 18:25:17 +00:00
|
|
|
|
2016-06-04 17:05:12 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scopatz";
|
|
|
|
repo = "xonsh";
|
|
|
|
rev = version;
|
2017-11-26 10:21:45 +00:00
|
|
|
sha256= "0hfsan22i81wffx2xbamm8wwkxgpv12z4kfl37p9m22vpqgg0fdg";
|
2016-06-04 17:05:12 +01:00
|
|
|
};
|
|
|
|
|
2017-11-21 00:08:50 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
postPatch = ''
|
2016-06-04 17:05:12 +01:00
|
|
|
rm xonsh/winutils.py
|
2017-11-21 00:08:50 +00:00
|
|
|
|
|
|
|
sed -ie "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
|
|
|
|
sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' scripts/xon.sh
|
|
|
|
|
|
|
|
patchShebangs .
|
2015-03-26 18:25:17 +00:00
|
|
|
'';
|
|
|
|
|
2016-06-04 17:05:12 +01:00
|
|
|
checkPhase = ''
|
2017-11-21 00:08:50 +00:00
|
|
|
HOME=$TMPDIR XONSH_INTERACTIVE=0 \
|
|
|
|
pytest \
|
|
|
|
-k 'not test_man_completion and not test_printfile and not test_sourcefile and not test_printname ' \
|
|
|
|
tests
|
2016-06-04 17:05:12 +01:00
|
|
|
'';
|
2015-03-26 18:25:17 +00:00
|
|
|
|
2017-11-21 00:08:50 +00:00
|
|
|
checkInputs = with python3Packages; [ pytest glibcLocales ];
|
|
|
|
|
2016-06-04 17:05:12 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ];
|
2015-03-26 18:25:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Python-ish, BASHwards-compatible shell";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://xonsh.org;
|
2015-03-26 18:25:17 +00:00
|
|
|
license = licenses.bsd3;
|
2016-06-25 17:27:11 +01:00
|
|
|
maintainers = with maintainers; [ spwhitt garbas vrthra ];
|
2015-03-26 18:25:17 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2016-05-14 14:03:37 +01:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
shellPath = "/bin/xonsh";
|
|
|
|
};
|
2015-03-26 18:25:17 +00:00
|
|
|
}
|