nixpkgs/pkgs/shells/xonsh/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2018-11-09 13:06:41 +00:00
{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils, git }:
2015-03-26 18:25:17 +00:00
python3Packages.buildPythonApplication rec {
2018-11-09 13:06:41 +00:00
pname = "xonsh";
version = "0.8.3";
2015-03-26 18:25:17 +00:00
2018-11-09 13:06:41 +00:00
# fetch from github because the pypi package ships incomplete tests
src = fetchFromGitHub {
2018-11-09 13:06:41 +00:00
owner = "scopatz";
repo = "xonsh";
rev = "refs/tags/${version}";
sha256 = "1qnghqswvqlwv9121r4maibmn2dvqmbr3fhsnngsj3q7plfp7yb2";
};
2017-11-21 00:08:50 +00:00
LC_ALL = "en_US.UTF-8";
postPatch = ''
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
'';
checkPhase = ''
2018-11-09 13:06:41 +00:00
HOME=$TMPDIR \
2017-11-21 00:08:50 +00:00
pytest \
2018-11-09 13:06:41 +00:00
-k 'not test_man_completion and not test_indir and not test_xonsh_party and not test_foreign_bash_data and not test_script and not test_single_command_no_windows and not test_redirect_out_to_file and not test_sourcefile and not test_printname and not test_printfile'
'';
2015-03-26 18:25:17 +00:00
2018-11-09 13:06:41 +00:00
checkInputs = [ python3Packages.pytest glibcLocales git ];
2017-11-21 00:08:50 +00:00
propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit pygments ];
2015-03-26 18:25:17 +00:00
meta = with stdenv.lib; {
description = "A Python-ish, BASHwards-compatible shell";
2018-04-23 07:56:41 +00:00
homepage = http://xon.sh/;
2015-03-26 18:25:17 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ spwhitt garbas vrthra ];
2015-03-26 18:25:17 +00:00
platforms = platforms.all;
};
2016-05-14 13:03:37 +00:00
passthru = {
shellPath = "/bin/xonsh";
};
2015-03-26 18:25:17 +00:00
}