nixpkgs-suyu/pkgs/shells/xonsh/default.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils }:
2015-03-26 19:25:17 +01:00
python3Packages.buildPythonApplication rec {
2015-03-26 19:25:17 +01:00
name = "xonsh-${version}";
version = "0.6.7";
2015-03-26 19:25:17 +01:00
src = fetchFromGitHub {
owner = "scopatz";
repo = "xonsh";
rev = version;
sha256= "0vxdfq1wpajfypdl5lhvib50mk742dk8y375zf3h057hjb0khhgw";
};
2017-11-21 01:08:50 +01:00
LC_ALL = "en_US.UTF-8";
postPatch = ''
rm xonsh/winutils.py
2017-11-21 01:08:50 +01: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 19:25:17 +01:00
'';
checkPhase = ''
2017-11-21 01:08:50 +01: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
'';
2015-03-26 19:25:17 +01:00
2017-11-21 01:08:50 +01:00
checkInputs = with python3Packages; [ pytest glibcLocales ];
propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ];
2015-03-26 19:25:17 +01:00
meta = with stdenv.lib; {
description = "A Python-ish, BASHwards-compatible shell";
2018-04-23 09:56:41 +02:00
homepage = http://xon.sh/;
2015-03-26 19:25:17 +01:00
license = licenses.bsd3;
maintainers = with maintainers; [ spwhitt garbas vrthra ];
2015-03-26 19:25:17 +01:00
platforms = platforms.all;
};
2016-05-14 15:03:37 +02:00
passthru = {
shellPath = "/bin/xonsh";
};
2015-03-26 19:25:17 +01:00
}