summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorSpencer Whitt <sw@swhitt.me>2015-03-26 14:25:17 -0400
committerSpencer Whitt <sw@swhitt.me>2015-03-26 14:25:17 -0400
commita1044bd26e63502f7a8797f075349bb277c3b1c1 (patch)
tree30e1834f725aab287f883862c20dc663d3f317fb /pkgs/shells
parenteff3fa79496c98715af34284f6e2bfd4ac84771b (diff)
xonsh: new package
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/xonsh/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix
new file mode 100644
index 0000000000000..3849c96ec1310
--- /dev/null
+++ b/pkgs/shells/xonsh/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, python3Packages}:
+
+python3Packages.buildPythonPackage rec {
+  name = "xonsh-${version}";
+  version = "0.1.3";
+
+  # The logo xonsh prints during build contains unicode characters, and this
+  # fails because locales have not been set up in the build environment.
+  # 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)" ""
+  '';
+
+  propagatedBuildInputs = [ python3Packages.ply ];
+
+  src = fetchurl {
+    url = "https://github.com/scopatz/xonsh/archive/${version}.zip";
+    sha256 = "0p2d7p892w77ii8yy51vpw7jlz2y53k8g61m7l8bar3hr3qrl306";
+  };
+
+  meta = with stdenv.lib; {
+    description = "A Python-ish, BASHwards-compatible shell";
+    homepage = "http://xonsh.org";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.spwhitt ];
+    platforms = platforms.all;
+  };
+}