about summary refs log tree commit diff
path: root/pkgs/development/python-modules/etebase/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/etebase/default.nix')
-rw-r--r--pkgs/development/python-modules/etebase/default.nix63
1 files changed, 41 insertions, 22 deletions
diff --git a/pkgs/development/python-modules/etebase/default.nix b/pkgs/development/python-modules/etebase/default.nix
index 15815f33ee4f..5157aa329dcd 100644
--- a/pkgs/development/python-modules/etebase/default.nix
+++ b/pkgs/development/python-modules/etebase/default.nix
@@ -1,33 +1,51 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, buildPythonPackage
-, rustPlatform
-, cargo
-, pkg-config
-, rustc
-, rustfmt
-, setuptools-rust
-, openssl
-, Security
-, msgpack
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  buildPythonPackage,
+  rustPlatform,
+  cargo,
+  pkg-config,
+  rustc,
+  rustfmt,
+  setuptools-rust,
+  openssl,
+  Security,
+  msgpack,
+  fetchpatch,
+  nixosTests,
 }:
 
 buildPythonPackage rec {
   pname = "etebase";
-  version = "0.31.6";
+  version = "0.31.7";
 
   src = fetchFromGitHub {
     owner = "etesync";
     repo = "etebase-py";
     rev = "v${version}";
-    hash = "sha256-T61nPW3wjBRjmJ81w59T1b/Kxrwwqvyj3gILE9OF/5Q=";
+    hash = "sha256-ZNUUp/0fGJxL/Rt8sAZ864rg8uCcNybIYSk4POt0vqg=";
   };
 
+  # https://github.com/etesync/etebase-py/pull/54
+  patches = [
+    # fix python 3.12 build
+    (fetchpatch {
+      url = "https://github.com/etesync/etebase-py/commit/898eb3aca1d4eb30d4aeae15e35d0bc45dd7b3c8.patch";
+      hash = "sha256-0BDUTztiC4MiwwNEDFtfc5ruc69Qk+svepQZRixNJgA=";
+    })
+    # replace flapigen git dependency in Cargo.lock
+    (fetchpatch {
+      url = "https://github.com/etesync/etebase-py/commit/7e9e4244a144dd46383d8be950d3df79e28eb069.patch";
+      hash = "sha256-8EH8Sc3UnmuCrSwDf3+as218HiG2Ed3r+FCMrUi5YrI=";
+    })
+  ];
+
   cargoDeps = rustPlatform.fetchCargoTarball {
     inherit src;
     name = "${pname}-${version}";
-    hash = "sha256-wrMNtcaLAsWBVeJbYbYo+Xmobl01lnUbR9NUqqUzUgU=";
+    hash = "sha256-We19laZd6b2fLSPNLegyNp0eQSeCvUJeTIXqvG7o08c=";
+    inherit patches;
   };
 
   format = "pyproject";
@@ -41,11 +59,9 @@ buildPythonPackage rec {
     rustc
   ];
 
-  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
+  buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
 
-  propagatedBuildInputs = [
-    msgpack
-  ];
+  propagatedBuildInputs = [ msgpack ];
 
   postPatch = ''
     # Use system OpenSSL, which gets security updates.
@@ -55,11 +71,14 @@ buildPythonPackage rec {
 
   pythonImportsCheck = [ "etebase" ];
 
+  passthru.tests = {
+    inherit (nixosTests) etebase-server;
+  };
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
+    broken = stdenv.hostPlatform.isDarwin;
     homepage = "https://www.etebase.com/";
-    description = "A Python client library for Etebase";
+    description = "Python client library for Etebase";
     license = licenses.bsd3;
     maintainers = with maintainers; [ _3699n ];
   };