summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorArseniy Seroka <jagajaga@users.noreply.github.com>2015-06-21 15:31:17 +0300
committerArseniy Seroka <jagajaga@users.noreply.github.com>2015-06-21 15:31:17 +0300
commit7ed48bff724d01e38e5e77a9c48d122f4386b892 (patch)
tree995933f85edd6d7b7385500cfa75d9a5a7186259 /pkgs
parentef22e1157bfa33e47c11e5134b85af0244046998 (diff)
parent563167bbe73a7be4e6269db4e4a2c39121c623fc (diff)
downloadnixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar.gz
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar.bz2
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar.lz
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar.xz
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.tar.zst
nixlib-7ed48bff724d01e38e5e77a9c48d122f4386b892.zip
Merge pull request #8443 from matthiasbeyer/add-tasknc
Add package: tasknc
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/tasknc/default.nix46
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/misc/tasknc/default.nix b/pkgs/applications/misc/tasknc/default.nix
new file mode 100644
index 000000000000..f7460618d964
--- /dev/null
+++ b/pkgs/applications/misc/tasknc/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, taskwarrior, perl, ncurses }:
+
+stdenv.mkDerivation rec {
+  version = "0.8";
+  name = "tasknc-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/mjheagle8/tasknc/archive/v${version}.tar.gz";
+    sha256 = "0max5schga9hmf3vfqk2ic91dr6raxglyyjcqchzla280kxn5c28";
+  };
+
+  #
+  # I know this is ugly, but the Makefile does strange things in this package,
+  # so we have to:
+  #
+  #   1. Remove the "doc" task dependency from the "all" target
+  #   2. Remove the "tasknc.1" task dependency from the "install" target
+  #   3. Remove the installing of the tasknc.1 file from the install target as
+  #      we just removed the build target for it.
+  #
+  # TODO : One could also provide a patch for the doc/manual.pod file so it
+  # actually builds, but I'm not familiar with this, so this is the faster
+  # approach for me. We have no manpage, though.
+  #
+  preConfigure = ''
+    sed -i -r 's,(all)(.*)doc,\1\2,' Makefile
+    sed -i -r 's,(install)(.*)tasknc\.1,\1\2,' Makefile
+    sed -i -r 's,install\ -D\ -m644\ tasknc\.1\ (.*),,' Makefile
+  '';
+
+  installPhase = ''
+    mkdir $out/bin/ -p
+    mkdir $out/share/man1 -p
+    mkdir $out/share/tasknc -p
+    DESTDIR=$out PREFIX= MANPREFIX=share make install
+  '';
+
+  buildInputs = [ taskwarrior perl ncurses ];
+
+  meta = {
+    homepage = "https://github.com/mjheagle8/tasknc";
+    description = "a ncurses wrapper around taskwarrior";
+    maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
+    platforms = stdenv.lib.platforms.linux; # Cannot test others
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 552694be44ce..afecd3b74337 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12576,6 +12576,8 @@ let
 
   taskjuggler = callPackage ../applications/misc/taskjuggler { };
 
+  tasknc = callPackage ../applications/misc/tasknc { };
+
   taskwarrior = callPackage ../applications/misc/taskwarrior { };
 
   taskserver = callPackage ../servers/misc/taskserver { };