about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-12-14 10:22:56 -0800
committerGitHub <noreply@github.com>2017-12-14 10:22:56 -0800
commit08c5578f2c6d86ad7d457127f0bf0c65d1986f27 (patch)
tree85d6c7a6cce7354d04f80f03eb93c98aed64f0f9 /pkgs
parent187b18f035c4186a74721413a0ef12326ca132d2 (diff)
parent9f5b8aaec4a62e7866276c4754321c6627c06434 (diff)
downloadnixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar.gz
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar.bz2
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar.lz
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar.xz
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.tar.zst
nixlib-08c5578f2c6d86ad7d457127f0bf0c65d1986f27.zip
Merge pull request #32672 from orivej/thefuck
thefuck: 3.18 -> 3.25
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/thefuck/default.nix38
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 25 insertions, 15 deletions
diff --git a/pkgs/tools/misc/thefuck/default.nix b/pkgs/tools/misc/thefuck/default.nix
index b399077bc5b4..788529125da5 100644
--- a/pkgs/tools/misc/thefuck/default.nix
+++ b/pkgs/tools/misc/thefuck/default.nix
@@ -1,22 +1,32 @@
-{ fetchurl, stdenv, pkgs, ... }:
+{ stdenv, fetchFromGitHub, buildPythonApplication
+, colorama, decorator, psutil, pyte, six
+, pytest, pytest-mock
+}:
 
-pkgs.pythonPackages.buildPythonPackage rec {
-  name = "${pname}-${version}";
+buildPythonApplication rec {
   pname = "thefuck";
-  version = "3.18";
+  version = "3.25";
 
-  src = fetchurl {
-    url = "https://github.com/nvbn/${pname}/archive/${version}.tar.gz";
-    sha256 = "1xsvkqh89rgxq5w03mnlcfkn9y39nfwhb2pjabjspcc2mi2mq5y6";
+  src = fetchFromGitHub {
+    owner = "nvbn";
+    repo = "${pname}";
+    rev = version;
+    sha256 = "090mg809aac932lgqmjxm4za53lg3bjprj562sp189k47xs4wijv";
   };
 
-  propagatedBuildInputs = with pkgs.pythonPackages; [
-    psutil
-    colorama
-    six
-    decorator
-    pathlib2
-  ];
+  propagatedBuildInputs = [ colorama decorator psutil pyte six ];
+
+  checkInputs = [ pytest pytest-mock ];
+
+  checkPhase = ''
+    export HOME=$TMPDIR
+    export LANG=en_US.UTF-8
+    export XDG_CACHE_HOME=$TMPDIR/cache
+    export XDG_CONFIG_HOME=$TMPDIR/config
+    py.test
+  '';
+
+  doCheck = false; # The above is only enough for tests to pass outside the sandbox.
 
   meta = with stdenv.lib; {
     homepage = https://github.com/nvbn/thefuck;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index da625136fcbf..15db26e0e4d1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4716,7 +4716,7 @@ with pkgs;
 
   thc-hydra = callPackage ../tools/security/thc-hydra { };
 
-  thefuck = callPackage ../tools/misc/thefuck { };
+  thefuck = python3Packages.callPackage ../tools/misc/thefuck { };
 
   thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools {  };