tasknc: update (0.8 -> 2017-05-15), fix, cleanup and man pages

+26 -32
+26 -32
pkgs/applications/misc/tasknc/default.nix
··· 1 - { stdenv, fetchurl, taskwarrior, perl, ncurses }: 1 + { stdenv, fetchFromGitHub, makeWrapper, perl, ncurses, taskwarrior }: 2 2 3 3 stdenv.mkDerivation rec { 4 - version = "0.8"; 4 + version = "2017-05-15"; 5 5 name = "tasknc-${version}"; 6 6 7 - src = fetchurl { 8 - url = "https://github.com/mjheagle8/tasknc/archive/v${version}.tar.gz"; 9 - sha256 = "0max5schga9hmf3vfqk2ic91dr6raxglyyjcqchzla280kxn5c28"; 7 + src = fetchFromGitHub { 8 + owner = "lharding"; 9 + repo = "tasknc"; 10 + rev = "c41d0240e9b848e432f01de735f28de93b934ae7"; 11 + sha256 = "0f7l7fy06p33vw6f6sjnjxfhw951664pmwhjl573jvmh6gi2h1yr"; 10 12 }; 11 13 14 + nativeBuildInputs = [ 15 + makeWrapper 16 + perl # For generating the man pages with pod2man 17 + ]; 18 + 19 + buildInputs = [ ncurses ]; 20 + 12 21 hardeningDisable = [ "format" ]; 13 22 14 - # 15 - # I know this is ugly, but the Makefile does strange things in this package, 16 - # so we have to: 17 - # 18 - # 1. Remove the "doc" task dependency from the "all" target 19 - # 2. Remove the "tasknc.1" task dependency from the "install" target 20 - # 3. Remove the installing of the tasknc.1 file from the install target as 21 - # we just removed the build target for it. 22 - # 23 - # TODO : One could also provide a patch for the doc/manual.pod file so it 24 - # actually builds, but I'm not familiar with this, so this is the faster 25 - # approach for me. We have no manpage, though. 26 - # 27 - preConfigure = '' 28 - sed -i -r 's,(all)(.*)doc,\1\2,' Makefile 29 - sed -i -r 's,(install)(.*)tasknc\.1,\1\2,' Makefile 30 - sed -i -r 's,install\ -D\ -m644\ tasknc\.1\ (.*),,' Makefile 31 - ''; 23 + buildFlags = [ "VERSION=${version}" ]; 32 24 33 25 installPhase = '' 34 - mkdir $out/bin/ -p 35 - mkdir $out/share/man1 -p 36 - mkdir $out/share/tasknc -p 37 - DESTDIR=$out PREFIX= MANPREFIX=share make install 26 + mkdir -p $out/bin/ 27 + mkdir -p $out/share/man/man1 28 + mkdir -p $out/share/tasknc 29 + 30 + DESTDIR=$out PREFIX= MANPREFIX=/share/man make install 31 + 32 + wrapProgram $out/bin/tasknc --prefix PATH : ${taskwarrior}/bin 38 33 ''; 39 34 40 - buildInputs = [ taskwarrior perl ncurses ]; 41 35 42 - meta = { 43 - homepage = https://github.com/mjheagle8/tasknc; 36 + meta = with stdenv.lib; { 37 + homepage = https://github.com/lharding/tasknc; 44 38 description = "A ncurses wrapper around taskwarrior"; 45 - maintainers = [ stdenv.lib.maintainers.matthiasbeyer ]; 46 - platforms = stdenv.lib.platforms.linux; # Cannot test others 39 + maintainers = with maintainers; [ matthiasbeyer infinisil ]; 40 + platforms = platforms.linux; # Cannot test others 47 41 }; 48 42 }