summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-02-12 04:16:32 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-02-12 20:35:38 +0100
commitb2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c (patch)
tree5cc9153f4746d44e19d704084f621d9e06813ca8 /pkgs/applications
parentf787a71451a61816ab31529434038a37f6982c66 (diff)
downloadnixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar.gz
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar.bz2
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar.lz
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar.xz
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.tar.zst
nixpkgs-b2bc6ccc65cf99590af5a1dcf4b5491b7aa7644c.zip
ranger: cleanup, use pytestCheckHook
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/ranger/default.nix20
1 files changed, 6 insertions, 14 deletions
diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix
index 619b2ba9955..102e2ae9c34 100644
--- a/pkgs/applications/misc/ranger/default.nix
+++ b/pkgs/applications/misc/ranger/default.nix
@@ -1,12 +1,8 @@
 { lib, fetchFromGitHub, python3Packages, file, less, highlight
-, imagePreviewSupport ? true, w3m ? null}:
-
-with lib;
-
-assert imagePreviewSupport -> w3m != null;
+, imagePreviewSupport ? true, w3m }:
 
 python3Packages.buildPythonApplication rec {
-  name = "ranger-${version}";
+  pname = "ranger";
   version = "1.9.3";
 
   src = fetchFromGitHub {
@@ -18,14 +14,10 @@ python3Packages.buildPythonApplication rec {
 
   LC_ALL = "en_US.UTF-8";
 
-  checkInputs = with python3Packages; [ pytest ];
+  checkInputs = with python3Packages; [ pytestCheckHook ];
   propagatedBuildInputs = [ file ]
     ++ lib.optionals (imagePreviewSupport) [ python3Packages.pillow ];
 
-  checkPhase = ''
-    py.test tests
-  '';
-
   preConfigure = ''
     ${lib.optionalString (highlight != null) ''
       sed -i -e 's|^\s*highlight\b|${highlight}/bin/highlight|' \
@@ -45,7 +37,7 @@ python3Packages.buildPythonApplication rec {
     # give file previews out of the box
     substituteInPlace ranger/config/rc.conf \
       --replace "#set preview_script ~/.config/ranger/scope.sh" "set preview_script $out/share/doc/ranger/config/scope.sh"
-  '' + optionalString imagePreviewSupport ''
+  '' + lib.optionalString imagePreviewSupport ''
     substituteInPlace ranger/ext/img_display.py \
       --replace /usr/lib/w3m ${w3m}/libexec/w3m
 
@@ -57,8 +49,8 @@ python3Packages.buildPythonApplication rec {
   meta =  with lib; {
     description = "File manager with minimalistic curses interface";
     homepage = "http://ranger.github.io/";
-    license = licenses.gpl3;
+    license = licenses.gpl3Only;
     platforms = platforms.unix;
-    maintainers = [ maintainers.toonn maintainers.magnetophon ];
+    maintainers = with maintainers; [ toonn magnetophon ];
   };
 }