about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/etebase/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/etebase/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/etebase/default.nix57
1 files changed, 30 insertions, 27 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/etebase/default.nix b/nixpkgs/pkgs/development/python-modules/etebase/default.nix
index 7832f6b4787a..14c93fc719f2 100644
--- a/nixpkgs/pkgs/development/python-modules/etebase/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/etebase/default.nix
@@ -1,56 +1,59 @@
-{ lib, stdenv
-, wheel
+{ lib
+, stdenv
+, fetchFromGitHub
+, buildPythonPackage
 , rustPlatform
-, pipInstallHook
+, pkg-config
+, rustfmt
 , setuptools-rust
-, python
-, msgpack
-, requests
 , openssl
-, perl
-, rustfmt
-, fetchFromGitHub
 , Security
+, msgpack
 }:
 
-rustPlatform.buildRustPackage rec {
+buildPythonPackage rec {
   pname = "etebase";
-  version = "0.31.1";
+  version = "0.31.2";
 
   src = fetchFromGitHub {
     owner = "etesync";
     repo = "etebase-py";
     rev = "v${version}";
-    sha256 = "163iw64l8lwawf84qswcjsq9p8qddv9ysjrr3dzqpqxb2yb0sy39";
+    hash = "sha256-enGmfXW8eV6FgdHfJqXr1orAsGbxDz9xUY6T706sf5U=";
   };
 
-  cargoSha256 = "0w8ypl6kj1mf6ahbdiwbd4jw6ldxdaig47zwk91jjsww5lbyx4lf";
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-4eJvFf6aY+DYkrYgam5Ok9941PX4uQOmtRznEY0+1TE=";
+  };
+
+  format = "pyproject";
 
   nativeBuildInputs = [
+    pkg-config
     rustfmt
-    perl
-    openssl
-    pipInstallHook
     setuptools-rust
-    wheel
-  ];
+  ] ++ (with rustPlatform; [
+    cargoSetupHook
+    rust.cargo
+    rust.rustc
+  ]);
 
-  buildInputs = lib.optionals stdenv.isDarwin [ Security ];
+  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
 
   propagatedBuildInputs = [
-    python
     msgpack
   ];
 
-  doCheck = true;
-
-  buildPhase = ''
-    ${python.interpreter} setup.py bdist_wheel
+  postPatch = ''
+    # Use system OpenSSL, which gets security updates.
+    substituteInPlace Cargo.toml \
+      --replace ', features = ["vendored"]' ""
   '';
 
-  installPhase = ''
-    pipInstallPhase
-  '';
+  pythonImportsCheck = [ "etebase" ];
+
 
   meta = with lib; {
     homepage = "https://www.etebase.com/";