Merge pull request #115049 from danieldk/etebase-improvements

This commit is contained in:
Sandro 2021-03-07 02:31:02 +01:00 committed by GitHub
commit 295444f60e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,56 +1,59 @@
{ lib, stdenv { lib
, wheel , stdenv
, rustPlatform
, pipInstallHook
, setuptools-rust
, python
, msgpack
, requests
, openssl
, perl
, rustfmt
, fetchFromGitHub , fetchFromGitHub
, buildPythonPackage
, rustPlatform
, pkg-config
, rustfmt
, setuptools-rust
, openssl
, Security , Security
, msgpack
}: }:
rustPlatform.buildRustPackage rec { buildPythonPackage rec {
pname = "etebase"; pname = "etebase";
version = "0.31.1"; version = "0.31.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "etesync"; owner = "etesync";
repo = "etebase-py"; repo = "etebase-py";
rev = "v${version}"; 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 = [ nativeBuildInputs = [
pkg-config
rustfmt rustfmt
perl
openssl
pipInstallHook
setuptools-rust setuptools-rust
wheel ] ++ (with rustPlatform; [
]; cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = lib.optionals stdenv.isDarwin [ Security ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
propagatedBuildInputs = [ propagatedBuildInputs = [
python
msgpack msgpack
]; ];
doCheck = true; postPatch = ''
# Use system OpenSSL, which gets security updates.
buildPhase = '' substituteInPlace Cargo.toml \
${python.interpreter} setup.py bdist_wheel --replace ', features = ["vendored"]' ""
''; '';
installPhase = '' pythonImportsCheck = [ "etebase" ];
pipInstallPhase
'';
meta = with lib; { meta = with lib; {
homepage = "https://www.etebase.com/"; homepage = "https://www.etebase.com/";