summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRok Garbas <rok@garbas.si>2016-06-04 18:05:12 +0200
committerRok Garbas <rok@garbas.si>2016-06-04 18:05:12 +0200
commit66c73b3f369313c74761688d8357acb0d8ab08b2 (patch)
tree21edb70f8cbb2dcb357bb4424e3da0d258919e4c /pkgs
parentf878018eceda14682c6d56d6bad2e3783a7c6736 (diff)
downloadnixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar.gz
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar.bz2
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar.lz
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar.xz
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.tar.zst
nixpkgs-66c73b3f369313c74761688d8357acb0d8ab08b2.zip
xonsh: 0.2.7 -> 0.3.2
* pythonPackages.prompt_toolkit make it build for py35
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/shells/xonsh/default.nix45
-rw-r--r--pkgs/top-level/python-packages.nix5
2 files changed, 32 insertions, 18 deletions
diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix
index 5af78c27266..395132bc2d8 100644
--- a/pkgs/shells/xonsh/default.nix
+++ b/pkgs/shells/xonsh/default.nix
@@ -1,31 +1,44 @@
-{stdenv, fetchurl, python3Packages}:
+{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils }:
 
 python3Packages.buildPythonApplication rec {
   name = "xonsh-${version}";
-  version = "0.2.7";
+  version = "0.3.2";
 
-  # 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)" ""
+  src = fetchFromGitHub {
+    owner = "scopatz";
+    repo = "xonsh";
+    rev = version;
+    sha256= "0cqfrpvkgzk0q3dykavqxwfqrx61y8rbzixmwcv8pfa9r2sya24q";
+  };
+
+  ## 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 = ''
+    rm xonsh/winutils.py
+    sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
+    rm tests/test_main.py
+    rm tests/test_man.py
   '';
 
-  propagatedBuildInputs = [ python3Packages.ply ];
+  checkPhase = ''
+    HOME=$TMPDIR nosetests -x
+  '';
 
-  src = fetchurl {
-    url = "mirror://pypi/x/xonsh/${name}.tar.gz";
-    sha256= "10pglgmzj6l0l8mb3r2rxnbigqigcqn9njcgdcrg7s1b409cq4md";
-  };
+  buildInputs = with python3Packages; [ glibcLocales nose pygments ];
+  propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ];
 
   meta = with stdenv.lib; {
     description = "A Python-ish, BASHwards-compatible shell";
     homepage = "http://xonsh.org";
     license = licenses.bsd3;
-    maintainers = [ maintainers.spwhitt ];
+    maintainers = with maintainers; [ spwhitt garbas ];
     platforms = platforms.all;
   };
 }
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 60dca7f1dec..7d7c4bc58aa 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -16773,8 +16773,9 @@ in modules // {
       sha256 = "192fyzs0hyq0k7wxxl00jwl334l5hwwmdflhvjqqrlj0dsgfs22i";
       url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz";
     };
-
-    disabled = isPy35;
+    checkPhase = ''
+      rm prompt_toolkit/win32_types.py
+    '';
 
     buildInputs = with self; [ jedi ipython pygments ];
     propagatedBuildInputs = with self; [ docopt six wcwidth ];