From b2cf9529d641ddd4a3e7dc210f87d68b4653dfd2 Mon Sep 17 00:00:00 2001 From: Eric Wolf Date: Wed, 15 Aug 2018 08:00:55 +0200 Subject: [PATCH 1/2] ptask: remove usage of nonexistent function is_error see https://github.com/json-c/json-c/issues/304 --- pkgs/applications/misc/ptask/default.nix | 2 +- pkgs/applications/misc/ptask/json_c_is_error.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/misc/ptask/json_c_is_error.patch diff --git a/pkgs/applications/misc/ptask/default.nix b/pkgs/applications/misc/ptask/default.nix index e1a64c73a12..6cbc90806ca 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" \ 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 00000000000..435c8b26e6f --- /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; From ff9a38ee8974b2fe272da2cad1339d148bd15bd3 Mon Sep 17 00:00:00 2001 From: Eric Wolf Date: Wed, 15 Aug 2018 12:00:43 +0200 Subject: [PATCH 2/2] ptask: prevent building on darwin as this fails as of now --- pkgs/applications/misc/ptask/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/ptask/default.nix b/pkgs/applications/misc/ptask/default.nix index 6cbc90806ca..81e316eb0ee 100644 --- a/pkgs/applications/misc/ptask/default.nix +++ b/pkgs/applications/misc/ptask/default.nix @@ -25,5 +25,6 @@ stdenv.mkDerivation rec { description = "GTK-based GUI for taskwarrior"; license = licenses.gpl2; maintainers = [ maintainers.spacefrogg ]; + platforms = platforms.linux; }; }