@@ -0,0 +1,31 @@
1+{stdenv, fetchurl, python3Packages}:
2+
3+python3Packages.buildPythonPackage rec {
4+ name = "xonsh-${version}";
5+ version = "0.1.3";
6+
7+ # The logo xonsh prints during build contains unicode characters, and this
8+ # fails because locales have not been set up in the build environment.
9+ # We can fix this on Linux by setting:
10+ # export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive
11+ # but this would not be a cross platform solution, so it's simpler to just
12+ # patch the setup.py script to not print the logo during build.
13+ prePatch = ''
14+ substituteInPlace setup.py --replace "print(logo)" ""
15+ '';
16+
17+ propagatedBuildInputs = [ python3Packages.ply ];
18+
19+ src = fetchurl {
20+ url = "https://github.com/scopatz/xonsh/archive/${version}.zip";
21+ sha256 = "0p2d7p892w77ii8yy51vpw7jlz2y53k8g61m7l8bar3hr3qrl306";
22+ };
23+
24+ meta = with stdenv.lib; {
25+ description = "A Python-ish, BASHwards-compatible shell";
26+ homepage = "http://xonsh.org";
27+ license = licenses.bsd3;
28+ maintainers = [ maintainers.spwhitt ];
29+ platforms = platforms.all;
30+ };
31+}