2021-03-04 07:45:33 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
2020-11-30 21:08:52 +00:00
|
|
|
, rustPlatform
|
2021-03-04 07:45:33 +00:00
|
|
|
, pkg-config
|
|
|
|
, rustfmt
|
2020-11-30 21:08:52 +00:00
|
|
|
, setuptools-rust
|
|
|
|
, openssl
|
|
|
|
, Security
|
2021-03-04 07:45:33 +00:00
|
|
|
, msgpack
|
2020-11-30 21:08:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-03-04 07:45:33 +00:00
|
|
|
buildPythonPackage rec {
|
2020-11-30 21:08:52 +00:00
|
|
|
pname = "etebase";
|
2021-03-04 07:48:26 +00:00
|
|
|
version = "0.31.2";
|
2020-11-30 21:08:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "etesync";
|
|
|
|
repo = "etebase-py";
|
|
|
|
rev = "v${version}";
|
2021-03-04 07:48:26 +00:00
|
|
|
hash = "sha256-enGmfXW8eV6FgdHfJqXr1orAsGbxDz9xUY6T706sf5U=";
|
2020-11-30 21:08:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-04 07:45:33 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2021-03-04 07:48:26 +00:00
|
|
|
hash = "sha256-4eJvFf6aY+DYkrYgam5Ok9941PX4uQOmtRznEY0+1TE=";
|
2021-03-04 07:45:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-11-30 21:08:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-03-04 07:45:33 +00:00
|
|
|
pkg-config
|
2020-11-30 21:08:52 +00:00
|
|
|
rustfmt
|
|
|
|
setuptools-rust
|
2021-03-04 07:45:33 +00:00
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
rust.cargo
|
|
|
|
rust.rustc
|
|
|
|
]);
|
2020-11-30 21:08:52 +00:00
|
|
|
|
2021-03-04 07:45:33 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
2020-11-30 21:08:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
msgpack
|
|
|
|
];
|
|
|
|
|
2021-03-04 07:45:33 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Use system OpenSSL, which gets security updates.
|
|
|
|
substituteInPlace Cargo.toml \
|
|
|
|
--replace ', features = ["vendored"]' ""
|
2020-11-30 21:08:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-04 07:45:33 +00:00
|
|
|
pythonImportsCheck = [ "etebase" ];
|
|
|
|
|
2020-11-30 21:08:52 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-30 21:08:52 +00:00
|
|
|
homepage = "https://www.etebase.com/";
|
|
|
|
description = "A Python client library for Etebase";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ _3699n ];
|
|
|
|
};
|
|
|
|
}
|