gnomeExtensions.taskwhisperer: 11 -> 12

* has a proper Makefile
* resync patch

Changes: https://github.com/cinatic/taskwhisperer/compare/v11...v12
This commit is contained in:
worldofpeace 2019-04-02 18:13:02 -04:00 committed by Jan Tojnar
parent 46874a7c45
commit 87d1ff41fd
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
2 changed files with 61 additions and 44 deletions

View File

@ -1,36 +1,35 @@
{ stdenv, substituteAll, fetchFromGitHub, taskwarrior }: { stdenv, substituteAll, fetchFromGitHub, taskwarrior, gettext, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "gnome-shell-extension-taskwhisperer-${version}"; name = "gnome-shell-extension-taskwhisperer-${version}";
version = "11"; version = "12";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cinatic"; owner = "cinatic";
repo = "taskwhisperer"; repo = "taskwhisperer";
rev = "v${version}"; rev = "v${version}";
sha256 = "1g1301rwnfg5jci78bjpmgxrn78ra80m1zp2inhfsm8jssr1i426"; sha256 = "187p6p498dd258avsfqqsm322g58y75pc2wbhb4jpmm9insqm1bj";
}; };
buildInputs = [ taskwarrior ]; nativeBuildInputs = [
gettext
];
buildInputs = [
taskwarrior
];
uuid = "taskwhisperer-extension@infinicode.de"; uuid = "taskwhisperer-extension@infinicode.de";
installPhase = '' makeFlags = [
mkdir -p $out/share/gnome-shell/extensions/${uuid} "INSTALLBASE=${placeholder ''out''}/share/gnome-shell/extensions"
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}
'';
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./fix-paths.patch; src = ./fix-paths.patch;
task = "${taskwarrior}/bin/task"; task = "${taskwarrior}/bin/task";
shell = "${runtimeShell}";
}) })
]; ];

View File

@ -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 index a69e369..35d5ea1 100755
--- a/extra/create.sh --- a/taskwhisperer-extension@infinicode.de/extra/create.sh
+++ b/extra/create.sh +++ b/taskwhisperer-extension@infinicode.de/extra/create.sh
@@ -1 +1 @@ @@ -1 +1 @@
-bash -c "task add $1" -bash -c "task add $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 index 7964a26..8edd21b 100755
--- a/extra/modify.sh --- a/taskwhisperer-extension@infinicode.de/extra/modify.sh
+++ b/extra/modify.sh +++ b/taskwhisperer-extension@infinicode.de/extra/modify.sh
@@ -1 +1 @@ @@ -1 +1 @@
-bash -c "task $1 modify $2" -bash -c "task $1 modify $2"
+bash -c "@task@ $1 modify $2" +bash -c "@task@ $1 modify $2"
diff --git a/taskService.js b/taskService.js diff --git a/taskwhisperer-extension@infinicode.de/taskService.js b/taskwhisperer-extension@infinicode.de/taskService.js
index dea40d8..ff35a80 100644 index ead7a12..aa36db4 100644
--- a/taskService.js --- a/taskwhisperer-extension@infinicode.de/taskService.js
+++ b/taskService.js +++ b/taskwhisperer-extension@infinicode.de/taskService.js
@@ -186,7 +186,7 @@ const TaskService = new Lang.Class({ @@ -182,7 +182,7 @@ const TaskService = class TaskService {
let project = projectName ? "project:" + projectName : ""; let project = projectName ? "project:" + projectName : "";
@ -25,57 +25,75 @@ index dea40d8..ff35a80 100644
let reader = new SpawnReader.SpawnReader(); let reader = new SpawnReader.SpawnReader();
let buffer = ""; let buffer = "";
@@ -227,7 +227,7 @@ const TaskService = new Lang.Class({ @@ -220,7 +220,7 @@ const TaskService = class TaskService {
break; 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);
+ 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; let shellProcExited = true;
@@ -274,7 +274,7 @@ const TaskService = new Lang.Class({ @@ -261,7 +261,7 @@ const TaskService = class TaskService {
return; 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);
+ 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; let shellProcExited = true;
@@ -307,7 +307,7 @@ const TaskService = new Lang.Class({ @@ -290,7 +290,7 @@ const TaskService = class TaskService {
return; 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);
+ 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; let shellProcExited = true;
@@ -339,7 +339,7 @@ const TaskService = new Lang.Class({ @@ -318,7 +318,7 @@ const TaskService = class TaskService {
{ if (!taskID) {
return; 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);
+ 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; let shellProcExited = true;
shellProc.wait_finish(result); shellProc.wait_finish(result);
@@ -369,7 +369,7 @@ const TaskService = new Lang.Class({ @@ -344,7 +344,7 @@ const TaskService = class TaskService {
{ if (!taskID) {
return; 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);
+ 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; let shellProcExited = true;
shellProc.wait_finish(result); 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);
+ 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;