diff options
author | worldofpeace <worldofpeace@users.noreply.github.com> | 2019-04-02 18:13:02 -0400 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-04-05 12:14:14 +0200 |
commit | 87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446 (patch) | |
tree | 62dad3a017107bdba279100ef82136a9f03e66a2 /pkgs/desktops/gnome-3/extensions | |
parent | 46874a7c45ed1fa23558e89876144de484c4d1c6 (diff) | |
download | nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar.gz nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar.bz2 nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar.lz nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar.xz nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.tar.zst nixpkgs-87d1ff41fdc5c8b2b887ac51d77fa5e8b9125446.zip |
gnomeExtensions.taskwhisperer: 11 -> 12
* has a proper Makefile * resync patch Changes: https://github.com/cinatic/taskwhisperer/compare/v11...v12
Diffstat (limited to 'pkgs/desktops/gnome-3/extensions')
-rw-r--r-- | pkgs/desktops/gnome-3/extensions/taskwhisperer/default.nix | 29 | ||||
-rw-r--r-- | pkgs/desktops/gnome-3/extensions/taskwhisperer/fix-paths.patch | 76 |
2 files changed, 61 insertions, 44 deletions
diff --git a/pkgs/desktops/gnome-3/extensions/taskwhisperer/default.nix b/pkgs/desktops/gnome-3/extensions/taskwhisperer/default.nix index fcaa868c06f..c72d72cce12 100644 --- a/pkgs/desktops/gnome-3/extensions/taskwhisperer/default.nix +++ b/pkgs/desktops/gnome-3/extensions/taskwhisperer/default.nix @@ -1,36 +1,35 @@ -{ stdenv, substituteAll, fetchFromGitHub, taskwarrior }: +{ stdenv, substituteAll, fetchFromGitHub, taskwarrior, gettext, runtimeShell }: stdenv.mkDerivation rec { name = "gnome-shell-extension-taskwhisperer-${version}"; - version = "11"; + version = "12"; src = fetchFromGitHub { owner = "cinatic"; repo = "taskwhisperer"; rev = "v${version}"; - sha256 = "1g1301rwnfg5jci78bjpmgxrn78ra80m1zp2inhfsm8jssr1i426"; + sha256 = "187p6p498dd258avsfqqsm322g58y75pc2wbhb4jpmm9insqm1bj"; }; - buildInputs = [ taskwarrior ]; + nativeBuildInputs = [ + gettext + ]; + + buildInputs = [ + taskwarrior + ]; uuid = "taskwhisperer-extension@infinicode.de"; - installPhase = '' - mkdir -p $out/share/gnome-shell/extensions/${uuid} - cp *.js $out/share/gnome-shell/extensions/${uuid} - cp -r extra $out/share/gnome-shell/extensions/${uuid} - cp -r icons $out/share/gnome-shell/extensions/${uuid} - cp -r locale $out/share/gnome-shell/extensions/${uuid} - cp -r schemas $out/share/gnome-shell/extensions/${uuid} - cp metadata.json $out/share/gnome-shell/extensions/${uuid} - cp settings.ui $out/share/gnome-shell/extensions/${uuid} - cp stylesheet.css $out/share/gnome-shell/extensions/${uuid} - ''; + makeFlags = [ + "INSTALLBASE=${placeholder ''out''}/share/gnome-shell/extensions" + ]; patches = [ (substituteAll { src = ./fix-paths.patch; task = "${taskwarrior}/bin/task"; + shell = "${runtimeShell}"; }) ]; diff --git a/pkgs/desktops/gnome-3/extensions/taskwhisperer/fix-paths.patch b/pkgs/desktops/gnome-3/extensions/taskwhisperer/fix-paths.patch index 310d6ea1b30..2ea54f4b089 100644 --- a/pkgs/desktops/gnome-3/extensions/taskwhisperer/fix-paths.patch +++ b/pkgs/desktops/gnome-3/extensions/taskwhisperer/fix-paths.patch @@ -1,22 +1,22 @@ -diff --git a/extra/create.sh b/extra/create.sh +diff --git a/taskwhisperer-extension@infinicode.de/extra/create.sh b/taskwhisperer-extension@infinicode.de/extra/create.sh index a69e369..35d5ea1 100755 ---- a/extra/create.sh -+++ b/extra/create.sh +--- a/taskwhisperer-extension@infinicode.de/extra/create.sh ++++ b/taskwhisperer-extension@infinicode.de/extra/create.sh @@ -1 +1 @@ -bash -c "task add $1" +bash -c "@task@ add $1" -diff --git a/extra/modify.sh b/extra/modify.sh +diff --git a/taskwhisperer-extension@infinicode.de/extra/modify.sh b/taskwhisperer-extension@infinicode.de/extra/modify.sh index 7964a26..8edd21b 100755 ---- a/extra/modify.sh -+++ b/extra/modify.sh +--- a/taskwhisperer-extension@infinicode.de/extra/modify.sh ++++ b/taskwhisperer-extension@infinicode.de/extra/modify.sh @@ -1 +1 @@ -bash -c "task $1 modify $2" +bash -c "@task@ $1 modify $2" -diff --git a/taskService.js b/taskService.js -index dea40d8..ff35a80 100644 ---- a/taskService.js -+++ b/taskService.js -@@ -186,7 +186,7 @@ const TaskService = new Lang.Class({ +diff --git a/taskwhisperer-extension@infinicode.de/taskService.js b/taskwhisperer-extension@infinicode.de/taskService.js +index ead7a12..aa36db4 100644 +--- a/taskwhisperer-extension@infinicode.de/taskService.js ++++ b/taskwhisperer-extension@infinicode.de/taskService.js +@@ -182,7 +182,7 @@ const TaskService = class TaskService { let project = projectName ? "project:" + projectName : ""; @@ -25,57 +25,75 @@ index dea40d8..ff35a80 100644 let reader = new SpawnReader.SpawnReader(); let buffer = ""; -@@ -227,7 +227,7 @@ const TaskService = new Lang.Class({ +@@ -220,7 +220,7 @@ const TaskService = class TaskService { break; } - let shellProc = Gio.Subprocess.new(['task', status, 'projects'], Gio.SubprocessFlags.STDOUT_PIPE); + let shellProc = Gio.Subprocess.new(['@task@', status, 'projects'], Gio.SubprocessFlags.STDOUT_PIPE); - shellProc.wait_async(null, function(obj, result){ + shellProc.wait_async(null, function (obj, result) { let shellProcExited = true; -@@ -274,7 +274,7 @@ const TaskService = new Lang.Class({ +@@ -261,7 +261,7 @@ const TaskService = class TaskService { return; } - let shellProc = Gio.Subprocess.new(['task', taskID.toString(), 'done'], Gio.SubprocessFlags.STDOUT_PIPE); + let shellProc = Gio.Subprocess.new(['@task@', taskID.toString(), 'done'], Gio.SubprocessFlags.STDOUT_PIPE); - shellProc.wait_async(null, function(obj, result){ + shellProc.wait_async(null, function (obj, result) { let shellProcExited = true; -@@ -307,7 +307,7 @@ const TaskService = new Lang.Class({ +@@ -290,7 +290,7 @@ const TaskService = class TaskService { return; } - let shellProc = Gio.Subprocess.new(['task', 'modify', taskID.toString(), 'status:pending'], Gio.SubprocessFlags.STDOUT_PIPE); + let shellProc = Gio.Subprocess.new(['@task@', 'modify', taskID.toString(), 'status:pending'], Gio.SubprocessFlags.STDOUT_PIPE); - shellProc.wait_async(null, function(obj, result){ + shellProc.wait_async(null, function (obj, result) { let shellProcExited = true; -@@ -339,7 +339,7 @@ const TaskService = new Lang.Class({ - { +@@ -318,7 +318,7 @@ const TaskService = class TaskService { + if (!taskID) { return; } - let shellProc = Gio.Subprocess.new(['task', taskID.toString(), 'start'], Gio.SubprocessFlags.STDOUT_PIPE); + let shellProc = Gio.Subprocess.new(['@task@', taskID.toString(), 'start'], Gio.SubprocessFlags.STDOUT_PIPE); - shellProc.wait_async(null, function(obj, result){ + shellProc.wait_async(null, function (obj, result) { let shellProcExited = true; shellProc.wait_finish(result); -@@ -369,7 +369,7 @@ const TaskService = new Lang.Class({ - { +@@ -344,7 +344,7 @@ const TaskService = class TaskService { + if (!taskID) { return; } - let shellProc = Gio.Subprocess.new(['task', taskID.toString(), 'stop'], Gio.SubprocessFlags.STDOUT_PIPE); + let shellProc = Gio.Subprocess.new(['@task@', taskID.toString(), 'stop'], Gio.SubprocessFlags.STDOUT_PIPE); - shellProc.wait_async(null, function(obj, result){ + shellProc.wait_async(null, function (obj, result) { let shellProcExited = true; shellProc.wait_finish(result); -@@ -468,7 +468,7 @@ const TaskService = new Lang.Class({ +@@ -374,7 +374,7 @@ const TaskService = class TaskService { + // FIXME: Gio.Subprocess: due to only passing string vector is allowed, it's not possible to directly pass the + // input of the user to subprocess (why & how, if you can answer then please send msg to fh@infinicode.de) + // bypassing problem with own shell script +- let shellProc = Gio.Subprocess.new(['/bin/sh', EXTENSIONDIR + '/extra/modify.sh', taskID.toString(), params], Gio.SubprocessFlags.STDOUT_PIPE + Gio.SubprocessFlags.STDERR_MERGE); ++ let shellProc = Gio.Subprocess.new(['@shell@', EXTENSIONDIR + '/extra/modify.sh', taskID.toString(), params], Gio.SubprocessFlags.STDOUT_PIPE + Gio.SubprocessFlags.STDERR_MERGE); - try - { + shellProc.wait_async(null, function (obj, result) { + let shellProcExited = true; +@@ -403,7 +403,7 @@ const TaskService = class TaskService { + // FIXME: Gio.Subprocess: due to only passing string vector is allowed, it's not possible to directly pass the + // input of the user to subprocess (why & how, if you can answer then please send msg to fh@infinicode.de) + // bypassing problem with own shell script +- let shellProc = Gio.Subprocess.new(['/bin/sh', EXTENSIONDIR + '/extra/create.sh', params], Gio.SubprocessFlags.STDOUT_PIPE + Gio.SubprocessFlags.STDERR_MERGE); ++ let shellProc = Gio.Subprocess.new(['@shell@', EXTENSIONDIR + '/extra/create.sh', params], Gio.SubprocessFlags.STDOUT_PIPE + Gio.SubprocessFlags.STDERR_MERGE); + + shellProc.wait_async(null, function (obj, result) { + let shellProcExited = true; +@@ -432,7 +432,7 @@ const TaskService = class TaskService { + let shellProc; + + try { - shellProc = Gio.Subprocess.new(['task', 'sync'], Gio.SubprocessFlags.STDOUT_PIPE); + shellProc = Gio.Subprocess.new(['@task@', 'sync'], Gio.SubprocessFlags.STDOUT_PIPE); - } - catch(err) - { + } catch (err) { + onError(err); + return; |