summaryrefslogtreecommitdiff
path: root/overlays/etesync-dav
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-04-10 20:56:16 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-04-10 20:56:16 +0200
commitc0e3d0e72d9d636728a5171511e3ce1003203567 (patch)
treec75fbcfe4802c48fd5162792f38475d74d2cad57 /overlays/etesync-dav
parent24207674f36e900fd2aa51787cb70756413962c2 (diff)
downloadnixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar
nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.gz
nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.bz2
nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.xz
nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.zip
bump
Diffstat (limited to 'overlays/etesync-dav')
-rw-r--r--overlays/etesync-dav/000-fix-setup-py.patch13
-rw-r--r--overlays/etesync-dav/default.nix64
-rw-r--r--overlays/etesync-dav/etebase.nix64
3 files changed, 25 insertions, 116 deletions
diff --git a/overlays/etesync-dav/000-fix-setup-py.patch b/overlays/etesync-dav/000-fix-setup-py.patch
new file mode 100644
index 00000000..00107feb
--- /dev/null
+++ b/overlays/etesync-dav/000-fix-setup-py.patch
@@ -0,0 +1,13 @@
1diff --git a/setup.py b/setup.py
2index a69cd1a..77c7fc5 100644
3--- a/setup.py
4+++ b/setup.py
5@@ -115,7 +115,7 @@ INSTALL_REQUIRES = [
6 'Flask>=1.1.1',
7 'Flask-WTF>=0.14.2,<1.0.0',
8 'requests[socks]>=2.21',
9- 'types-setuptools>=50.0.0'
10+ 'types-setuptools>=50.0.0',
11 'pyobjc-framework-Cocoa>=7.0.0 ; sys_platform=="darwin"',
12 ]
13
diff --git a/overlays/etesync-dav/default.nix b/overlays/etesync-dav/default.nix
index 378fa753..963c34e2 100644
--- a/overlays/etesync-dav/default.nix
+++ b/overlays/etesync-dav/default.nix
@@ -1,55 +1,15 @@
1{ final, prev, ... }: { 1{ final, prev, ... }: {
2 etesync-dav = 2 etesync-dav = prev.etesync-dav.overrideAttrs (oldAttrs: rec {
3 let 3 version = "0.32.1";
4 inherit (final) lib stdenv python39 radicale3 callPackage; 4 src = prev.fetchFromGitHub {
5 5 owner = "etesync";
6 python = python39.override { 6 repo = "etesync-dav";
7 packageOverrides = self: super: { 7 rev = "108c23abf0f036522af38411bced50c4f6c0a731";
8 flask-wtf = super.flask-wtf.overridePythonAttrs (old: rec { 8 hash = "sha256-w0EuU+E9B2fp5/WfI/KJ8i1AuV4JHWNdZ8o6aopqrfs=";
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 }; 9 };
10 patches = (oldAttrs.patches or []) ++ [ ./000-fix-setup-py.patch ];
11 propagatedBuildInputs = (oldAttrs.propagatedBuildInputs or []) ++ [
12 prev.python3.pkgs.types-setuptools
13 ];
14 });
55} 15}
diff --git a/overlays/etesync-dav/etebase.nix b/overlays/etesync-dav/etebase.nix
deleted file mode 100644
index 8711725c..00000000
--- a/overlays/etesync-dav/etebase.nix
+++ /dev/null
@@ -1,64 +0,0 @@
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}