···11+{ stdenv, fetchurl, taskwarrior, perl, ncurses }:
22+33+stdenv.mkDerivation rec {
44+ version = "0.8";
55+ name = "tasknc-${version}";
66+77+ src = fetchurl {
88+ url = "https://github.com/mjheagle8/tasknc/archive/v${version}.tar.gz";
99+ sha256 = "0max5schga9hmf3vfqk2ic91dr6raxglyyjcqchzla280kxn5c28";
1010+ };
1111+1212+ #
1313+ # I know this is ugly, but the Makefile does strange things in this package,
1414+ # so we have to:
1515+ #
1616+ # 1. Remove the "doc" task dependency from the "all" target
1717+ # 2. Remove the "tasknc.1" task dependency from the "install" target
1818+ # 3. Remove the installing of the tasknc.1 file from the install target as
1919+ # we just removed the build target for it.
2020+ #
2121+ # TODO : One could also provide a patch for the doc/manual.pod file so it
2222+ # actually builds, but I'm not familiar with this, so this is the faster
2323+ # approach for me. We have no manpage, though.
2424+ #
2525+ preConfigure = ''
2626+ sed -i -r 's,(all)(.*)doc,\1\2,' Makefile
2727+ sed -i -r 's,(install)(.*)tasknc\.1,\1\2,' Makefile
2828+ sed -i -r 's,install\ -D\ -m644\ tasknc\.1\ (.*),,' Makefile
2929+ '';
3030+3131+ installPhase = ''
3232+ mkdir $out/bin/ -p
3333+ mkdir $out/share/man1 -p
3434+ mkdir $out/share/tasknc -p
3535+ DESTDIR=$out PREFIX= MANPREFIX=share make install
3636+ '';
3737+3838+ buildInputs = [ taskwarrior perl ncurses ];
3939+4040+ meta = {
4141+ homepage = "https://github.com/mjheagle8/tasknc";
4242+ description = "a ncurses wrapper around taskwarrior";
4343+ maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
4444+ platforms = stdenv.lib.platforms.linux; # Cannot test others
4545+ };
4646+}