summary refs log tree commit diff
path: root/pkgs/applications/misc/vit
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2019-03-10 22:17:42 -0500
committerWill Dietz <w@wdtz.org>2019-03-11 00:44:48 -0500
commit4e33431246cc491bc65a321f59599a4fe25b008b (patch)
tree7fe315af28e22cf86469cd86b39fe0e97251c613 /pkgs/applications/misc/vit
parent2a41d0304f26ae6880166b5869b78dccdeeb7f58 (diff)
downloadnixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar.gz
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar.bz2
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar.lz
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar.xz
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.tar.zst
nixpkgs-4e33431246cc491bc65a321f59599a4fe25b008b.zip
vit: 1.2 -> 1.3, cleanup + maintain
1.3 is essentially same as long-time beta 1.3.beta1

https://github.com/scottkosty/vit/releases/tag/v1.3
(and linked notes to the beta)
Diffstat (limited to 'pkgs/applications/misc/vit')
-rw-r--r--pkgs/applications/misc/vit/default.nix38
1 files changed, 21 insertions, 17 deletions
diff --git a/pkgs/applications/misc/vit/default.nix b/pkgs/applications/misc/vit/default.nix
index 40a399247e9..3eb797f182e 100644
--- a/pkgs/applications/misc/vit/default.nix
+++ b/pkgs/applications/misc/vit/default.nix
@@ -1,36 +1,40 @@
-{ pkgs, fetchgit, stdenv, makeWrapper, taskwarrior, ncurses,
-perl, perlPackages }:
+{ stdenv, fetchFromGitHub
+, makeWrapper, which
+, taskwarrior, ncurses, perlPackages }:
 
-let
-  version = "1.2";
-in
-stdenv.mkDerivation {
-  name = "vit-${version}";
+stdenv.mkDerivation rec {
+  pname = "vit";
+  version = "1.3";
 
-  src = fetchgit {
-    url = "https://git.tasktools.org/scm/ex/vit.git";
-    rev = "7d0042ca30e9d09cfbf9743b3bc72096e4a8fe1e";
-    sha256 = "92cad7169b3870145dff02256e547ae270996a314b841d3daed392ac6722827f";
+  src = fetchFromGitHub {
+    owner = "scottkosty";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0a34rh5w8393wf7jwwr0f74rp1zv2vz606z5j8sr7w19k352ijip";
   };
 
   preConfigure = ''
     substituteInPlace Makefile.in \
       --replace sudo ""
     substituteInPlace configure \
-      --replace /usr/bin/perl ${perl}/bin/perl
+      --replace /usr/bin/perl ${perlPackages.perl}/bin/perl
+    substituteInPlace cmdline.pl \
+      --replace "view " "vim -R "
   '';
 
   postInstall = ''
     wrapProgram $out/bin/vit --prefix PERL5LIB : $PERL5LIB
   '';
 
-  buildInputs = [ taskwarrior ncurses perlPackages.Curses perl makeWrapper ];
+  nativeBuildInputs = [ makeWrapper which ];
+  buildInputs = [ taskwarrior ncurses ]
+    ++ (with perlPackages; [ perl Curses TryTiny TextCharWidth ]);
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Visual Interactive Taskwarrior";
-    maintainers = with pkgs.lib.maintainers; [ ];
-    platforms = pkgs.lib.platforms.all;
-    license = pkgs.lib.licenses.gpl3;
+    maintainers = with maintainers; [ dtzWill ];
+    platforms = platforms.all;
+    license = licenses.gpl3;
   };
 }