about summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-11-21 00:08:50 +0000
committerJoerg Thalheim <joerg@thalheim.io>2017-11-21 00:09:18 +0000
commit1af0254fc714b383f97fc4bb6f2a6b708ebb38f3 (patch)
tree6315d9e1fc8eed705d7797e6ce7a6fa67ac64d12 /pkgs/shells
parentd5b02278c644625f49a20f89e5a03658b58e415a (diff)
xonsh: 0.4.3 -> 0.5.12
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/xonsh/default.nix35
1 files changed, 15 insertions, 20 deletions
diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix
index 598e6dbd9460..92433d7ef00f 100644
--- a/pkgs/shells/xonsh/default.nix
+++ b/pkgs/shells/xonsh/default.nix
@@ -2,39 +2,34 @@
 
 python3Packages.buildPythonApplication rec {
   name = "xonsh-${version}";
-  version = "0.4.3";
+  version = "0.5.12";
 
   src = fetchFromGitHub {
     owner = "scopatz";
     repo = "xonsh";
     rev = version;
-    sha256= "1lx95i468px908y18fa9fmfgmjsydhkpas89dxbwfnybqxxyd3ls";
+    sha256= "1s733ay5vcpcl14x23n0amnddyjfla55irddalvw52vijhd2aljz";
   };
 
-  ## 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)" ""
-  #'';
-  patchPhase = ''
+  LC_ALL = "en_US.UTF-8";
+  postPatch = ''
     rm xonsh/winutils.py
-    sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
-    sed -ie 's|test_win_ipconfig|_test_win_ipconfig|g' tests/test_execer.py
-    sed -ie 's|test_ipconfig|_test_ipconfig|g' tests/test_execer.py
-    rm tests/test_main.py
-    rm tests/test_man.py
-    rm tests/test_replay.py
+
+    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 .
   '';
 
   checkPhase = ''
-    HOME=$TMPDIR XONSH_INTERACTIVE=0 nosetests -x
+    HOME=$TMPDIR XONSH_INTERACTIVE=0 \
+      pytest \
+        -k 'not test_man_completion and not test_printfile and not test_sourcefile and not test_printname ' \
+        tests
   '';
 
-  buildInputs = with python3Packages; [ glibcLocales nose pytest ];
+  checkInputs = with python3Packages; [ pytest glibcLocales ];
+
   propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ];
 
   meta = with stdenv.lib; {