about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2018-12-26 02:26:46 +0000
committerOrivej Desh <orivej@gmx.fr>2018-12-26 02:52:28 +0000
commit3fd67fbb42d94fefe32af5955a546d146b5f7eb8 (patch)
tree08408a6ea5603260e33b4d23091f09af9aa3e23a /pkgs
parent84d133c8451646d4a55a2365b16983d08e41461a (diff)
downloadnixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar.gz
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar.bz2
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar.lz
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar.xz
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.tar.zst
nixlib-3fd67fbb42d94fefe32af5955a546d146b5f7eb8.zip
pythonPackages.taskw: fix build
Broken by 8600798172e6a4c526d593ec8da48ce28cf0d15c in #49741.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/taskw/default.nix3
-rw-r--r--pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch42
2 files changed, 6 insertions, 39 deletions
diff --git a/pkgs/development/python-modules/taskw/default.nix b/pkgs/development/python-modules/taskw/default.nix
index 328eb158eefb..d2d12ca0b962 100644
--- a/pkgs/development/python-modules/taskw/default.nix
+++ b/pkgs/development/python-modules/taskw/default.nix
@@ -5,6 +5,7 @@
 , tox
 , six
 , dateutil
+, kitchen
 , pytz
 , pkgs
 }:
@@ -28,7 +29,7 @@ buildPythonPackage rec {
   doCheck = false;
 
   buildInputs = [ nose pkgs.taskwarrior tox ];
-  propagatedBuildInputs = [ six dateutil pytz ];
+  propagatedBuildInputs = [ six dateutil kitchen pytz ];
 
   meta = with stdenv.lib; {
     homepage =  https://github.com/ralphbean/taskw;
diff --git a/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch b/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch
index 006d964d4016..8c7685c9d03b 100644
--- a/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch
+++ b/pkgs/development/python-modules/taskw/use-template-for-taskwarrior-install-path.patch
@@ -4,45 +4,11 @@ Date:   Sun Nov 16 15:19:38 2014 +0100
 
     Use a template for taskwarrior install path.
 
-diff --git a/taskw/warrior.py b/taskw/warrior.py
-index 21dde88..e0509f2 100644
 --- a/taskw/warrior.py
 +++ b/taskw/warrior.py
-@@ -451,17 +451,17 @@ class TaskWarriorShellout(TaskWarriorBase):
-     def _execute(self, *args):
-         """ Execute a given taskwarrior command with arguments
- 
-         Returns a 2-tuple of stdout and stderr (respectively).
- 
-         """
-         command = (
-             [
+@@ -449 +449 @@ class TaskWarriorShellout(TaskWarriorBase):
 -                'task',
 +                '@@taskwarrior@@/bin/task',
-                 'rc:%s' % self.config_filename,
-             ]
-             + self.get_configuration_override_args()
-             + [six.text_type(arg) for arg in args]
-         )
- 
-         # subprocess is expecting bytestrings only, so nuke unicode if present
-         for i in range(len(command)):
-@@ -525,17 +525,17 @@ class TaskWarriorShellout(TaskWarriorBase):
-         except OSError:
-             # OSError is raised if subprocess.Popen fails to find
-             # the executable.
-             return False
- 
-     @classmethod
-     def get_version(cls):
-         taskwarrior_version = subprocess.Popen(
--            ['task', '--version'],
-+            ['@@taskwarrior@@/bin/task', '--version'],
-             stdout=subprocess.PIPE
-         ).communicate()[0]
-         return LooseVersion(taskwarrior_version.decode())
- 
-     def sync(self, init=False):
-         if self.get_version() < LooseVersion('2.3'):
-             raise UnsupportedVersionException(
-                 "'sync' requires version 2.3 of taskwarrior or later."
+@@ -553 +553 @@ class TaskWarriorShellout(TaskWarriorBase):
+-                ['task', '--version'],
++                ['@@taskwarrior@@/bin/task', '--version'],