summaryrefslogtreecommitdiff
path: root/overlays/etesync-dav
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-01-05 22:35:36 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2023-01-05 22:35:36 +0100
commit674c7ae9b02296819aaec5c1cd8e79579e455eea (patch)
tree909abd101d23a5b700d054d0813b56b6a8315c66 /overlays/etesync-dav
parent306e45b42c14322b14f57f624585666e7bac6035 (diff)
downloadnixos-674c7ae9b02296819aaec5c1cd8e79579e455eea.tar
nixos-674c7ae9b02296819aaec5c1cd8e79579e455eea.tar.gz
nixos-674c7ae9b02296819aaec5c1cd8e79579e455eea.tar.bz2
nixos-674c7ae9b02296819aaec5c1cd8e79579e455eea.tar.xz
nixos-674c7ae9b02296819aaec5c1cd8e79579e455eea.zip
etesync-dav
Diffstat (limited to 'overlays/etesync-dav')
-rw-r--r--overlays/etesync-dav/default.nix55
-rw-r--r--overlays/etesync-dav/etebase.nix64
2 files changed, 119 insertions, 0 deletions
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}