nixpkgs/pkgs/development/python-modules/etebase/default.nix

65 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
2020-11-30 21:08:52 +00:00
, rustPlatform
, pkg-config
, rustfmt
2020-11-30 21:08:52 +00:00
, setuptools-rust
, openssl
, Security
, msgpack
2020-11-30 21:08:52 +00:00
}:
buildPythonPackage rec {
2020-11-30 21:08:52 +00:00
pname = "etebase";
version = "0.31.2";
2020-11-30 21:08:52 +00:00
src = fetchFromGitHub {
owner = "etesync";
repo = "etebase-py";
rev = "v${version}";
hash = "sha256-enGmfXW8eV6FgdHfJqXr1orAsGbxDz9xUY6T706sf5U=";
2020-11-30 21:08:52 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-4eJvFf6aY+DYkrYgam5Ok9941PX4uQOmtRznEY0+1TE=";
};
format = "pyproject";
2020-11-30 21:08:52 +00:00
nativeBuildInputs = [
pkg-config
2020-11-30 21:08:52 +00:00
rustfmt
setuptools-rust
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
2020-11-30 21:08:52 +00:00
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
2020-11-30 21:08:52 +00:00
propagatedBuildInputs = [
msgpack
];
postPatch = ''
# Use system OpenSSL, which gets security updates.
substituteInPlace Cargo.toml \
--replace ', features = ["vendored"]' ""
2020-11-30 21:08:52 +00:00
'';
pythonImportsCheck = [ "etebase" ];
2020-11-30 21:08:52 +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 ];
};
}