about summary refs log tree commit diff
path: root/pkgs/by-name/sy/syncall/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/sy/syncall/package.nix')
-rw-r--r--pkgs/by-name/sy/syncall/package.nix73
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/by-name/sy/syncall/package.nix b/pkgs/by-name/sy/syncall/package.nix
new file mode 100644
index 0000000000000..5ad793b672a28
--- /dev/null
+++ b/pkgs/by-name/sy/syncall/package.nix
@@ -0,0 +1,73 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "syncall";
+  version = "1.8.5";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "bergercookie";
+    repo = "syncall";
+    rev = "v${version}";
+    hash = "sha256-f9WVZ1gpVG0wvIqoAkeaYBE4QsGXSqrYS4KyHy6S+0Q=";
+  };
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+    --replace-fail 'loguru = "^0.5.3"' 'loguru = "^0.7"' \
+    --replace-fail 'PyYAML = "~5.3.1"' 'PyYAML = "^6.0"' \
+    --replace-fail 'bidict = "^0.21.2"' 'bidict = "^0.23"' \
+    --replace-fail 'typing = "^3.7.4"' '''
+  '';
+
+  nativeBuildInputs = [
+    python3.pkgs.poetry-core
+    python3.pkgs.poetry-dynamic-versioning
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    bidict
+    bubop
+    click
+    item-synchronizer
+    loguru
+    python-dateutil
+    pyyaml
+    rfc3339
+    typing
+
+    # asana optional-dep
+    asana
+    # caldav optional-dep
+    caldav
+    icalendar
+    # fs optional-dep
+    xattr
+    # gkeep optional-dep
+    # gkeepapi is unavailable in nixpkgs
+    # google optional-dep
+    google-api-python-client
+    google-auth-oauthlib
+    # notion optional-dep
+    # FIXME: notion-client -- broken, doesn't build.
+    # taskwarrior optional-dep
+    taskw-ng
+  ];
+
+  postInstall = ''
+    # We do not support gkeep
+    rm $out/bin/tw_gkeep_sync
+  '';
+
+  pythonImportsCheck = [ "syncall" ];
+
+  meta = with lib; {
+    description = "Bi-directional synchronization between services such as Taskwarrior, Google Calendar, Notion, Asana, and more";
+    homepage = "https://github.com/bergercookie/syncall";
+    license = licenses.mit;
+    maintainers = with maintainers; [ raitobezarius ];
+  };
+}