summary refs log tree commit diff
path: root/pkgs/applications/misc/ptask
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/ptask')
-rw-r--r--pkgs/applications/misc/ptask/default.nix3
-rw-r--r--pkgs/applications/misc/ptask/json_c_is_error.patch13
2 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/applications/misc/ptask/default.nix b/pkgs/applications/misc/ptask/default.nix
index e1a64c73a123..81e316eb0ee9 100644
--- a/pkgs/applications/misc/ptask/default.nix
+++ b/pkgs/applications/misc/ptask/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig makeWrapper ];
 
-  patches = [ ./tw-version.patch ];
+  patches = [ ./tw-version.patch ./json_c_is_error.patch ];
 
   preFixup = ''
     wrapProgram "$out/bin/ptask" \
@@ -25,5 +25,6 @@ stdenv.mkDerivation rec {
     description = "GTK-based GUI for taskwarrior";
     license = licenses.gpl2;
     maintainers = [ maintainers.spacefrogg ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/applications/misc/ptask/json_c_is_error.patch b/pkgs/applications/misc/ptask/json_c_is_error.patch
new file mode 100644
index 000000000000..435c8b26e6f7
--- /dev/null
+++ b/pkgs/applications/misc/ptask/json_c_is_error.patch
@@ -0,0 +1,13 @@
+diff --git a/src/tw.c b/src/tw.c
+index 602f7b3..ca601cd 100644
+--- a/src/tw.c
++++ b/src/tw.c
+@@ -163,7 +163,7 @@ static struct json_object *task_exec_json(const char *opts)
+ 
+ 	free(cmd);
+ 
+-	if (o && is_error(o))
++	if (!o)
+ 		return NULL;
+ 
+ 	return o;