summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accounts/gkleen@sif/default.nix8
-rw-r--r--overlays/etesync-dav/default.nix55
-rw-r--r--overlays/etesync-dav/etebase.nix64
3 files changed, 127 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index fd876f7c..39e17828 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -285,6 +285,11 @@ in {
285 ''); 285 '');
286 xss-lock.extraOptions = ["--transfer-sleep-lock"]; 286 xss-lock.extraOptions = ["--transfer-sleep-lock"];
287 }; 287 };
288
289 etesync-dav = {
290 enable = true;
291 serverUrl = "https://etesync.yggdrasil.li";
292 };
288 }; 293 };
289 294
290 home.pointerCursor = { 295 home.pointerCursor = {
@@ -350,6 +355,9 @@ in {
350 ".backup-munin".source = ./backup-patterns; 355 ".backup-munin".source = ./backup-patterns;
351 ".mozilla/firefox/default/chrome/userChrome.css".source = ./firefox-chrome.css; 356 ".mozilla/firefox/default/chrome/userChrome.css".source = ./firefox-chrome.css;
352 ".mozilla/firefox/default/chrome/userContent.css".source = ./firefox-content.css; 357 ".mozilla/firefox/default/chrome/userContent.css".source = ./firefox-content.css;
358 ".local/share/etesync-dav/CACHEDIR.TAG".text = ''
359 Signature: 8a477f597d28d172789f06886806bc55
360 '';
353 }; 361 };
354 362
355 sessionVariables = { 363 sessionVariables = {
diff --git a/overlays/etesync-dav/default.nix b/overlays/etesync-dav/default.nix
new file mode 100644
index 00000000..378fa753
--- /dev/null
+++ b/overlays/etesync-dav/default.nix
@@ -0,0 +1,55 @@
1{ final, prev, ... }: {
2 etesync-dav =
3 let
4 inherit (final) lib stdenv python39 radicale3 callPackage;
5
6 python = python39.override {
7 packageOverrides = self: super: {
8 flask-wtf = super.flask-wtf.overridePythonAttrs (old: rec {
9 version = "0.15.1";
10 src = old.src.override {
11 inherit version;
12 sha256 = "ff177185f891302dc253437fe63081e7a46a4e99aca61dfe086fb23e54fff2dc";
13 };
14 doCheck = false;
15 disabledTests = [
16 "test_outside_request"
17 ];
18 patches = [ ];
19 });
20 etebase = python.pkgs.callPackage ./etebase.nix { python39 = python; openssl = final.openssl_1_1; };
21 };
22 };
23 in python.pkgs.buildPythonApplication rec {
24 pname = "etesync-dav";
25 version = "0.32.1";
26
27 src = python.pkgs.fetchPypi {
28 inherit pname version;
29 sha256 = "a4e2ee83932755d29ac39c1e74005ec289880fd2d4d2164f09fe2464a294d720";
30 };
31
32 propagatedBuildInputs = with python.pkgs; [
33 appdirs
34 etebase
35 etesync
36 flask
37 flask-wtf
38 msgpack
39 pysocks
40 setuptools
41 (python.pkgs.toPythonModule (radicale3.override { python3 = python; }))
42 requests
43 ] ++ requests.optional-dependencies.socks;
44
45 doCheck = false;
46
47 meta = with lib; {
48 homepage = "https://www.etesync.com/";
49 description = "Secure, end-to-end encrypted, and privacy respecting sync for contacts, calendars and tasks";
50 license = licenses.gpl3;
51 maintainers = with maintainers; [ thyol valodim ];
52 broken = stdenv.isDarwin; # pyobjc-framework-Cocoa is missing
53 };
54 };
55}
diff --git a/overlays/etesync-dav/etebase.nix b/overlays/etesync-dav/etebase.nix
new file mode 100644
index 00000000..8711725c
--- /dev/null
+++ b/overlays/etesync-dav/etebase.nix
@@ -0,0 +1,64 @@
1{ lib
2, stdenv
3, fetchFromGitHub
4, python39
5, rustPlatform
6, pkg-config
7, rustfmt
8, setuptools-rust
9, openssl
10, msgpack
11}:
12
13python39.pkgs.buildPythonPackage rec {
14 pname = "etebase";
15 version = "0.31.6";
16
17 src = fetchFromGitHub {
18 owner = "etesync";
19 repo = "etebase-py";
20 rev = "v${version}";
21 hash = "sha256-T61nPW3wjBRjmJ81w59T1b/Kxrwwqvyj3gILE9OF/5Q=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoTarball {
25 inherit src;
26 name = "${pname}-${version}";
27 hash = "sha256-wrMNtcaLAsWBVeJbYbYo+Xmobl01lnUbR9NUqqUzUgU=";
28 };
29
30 format = "pyproject";
31
32 nativeBuildInputs = [
33 pkg-config
34 rustfmt
35 setuptools-rust
36 ] ++ (with rustPlatform; [
37 cargoSetupHook
38 rust.cargo
39 rust.rustc
40 ]);
41
42 buildInputs = [ openssl ];
43
44 propagatedBuildInputs = [
45 msgpack
46 ];
47
48 postPatch = ''
49 # Use system OpenSSL, which gets security updates.
50 substituteInPlace Cargo.toml \
51 --replace ', features = ["vendored"]' ""
52 '';
53
54 pythonImportsCheck = [ "etebase" ];
55
56
57 meta = with lib; {
58 broken = stdenv.isDarwin;
59 homepage = "https://www.etebase.com/";
60 description = "A Python client library for Etebase";
61 license = licenses.bsd3;
62 maintainers = with maintainers; [ _3699n thyol ];
63 };
64}