about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/etebase/default.nix
blob: 366c447ed9420bf4f14c4d1bf6c0632eb8444451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ stdenv
, wheel
, rustPlatform
, pipInstallHook
, setuptools-rust
, python
, msgpack
, requests
, openssl
, perl
, rustfmt
, fetchFromGitHub
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "etebase";
  version = "0.31.1";

  src = fetchFromGitHub {
    owner = "etesync";
    repo = "etebase-py";
    rev = "v${version}";
    sha256 = "163iw64l8lwawf84qswcjsq9p8qddv9ysjrr3dzqpqxb2yb0sy39";
  };

  cargoSha256 = "0w8ypl6kj1mf6ahbdiwbd4jw6ldxdaig47zwk91jjsww5lbyx4lf";

  nativeBuildInputs = [
    rustfmt
    perl
    openssl
    pipInstallHook
    setuptools-rust
    wheel
  ];

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];

  propagatedBuildInputs = [
    python
    msgpack
  ];

  doCheck = true;

  buildPhase = ''
    ${python.interpreter} setup.py bdist_wheel
  '';

  installPhase = ''
    pipInstallPhase
  '';

  meta = with stdenv.lib; {
    homepage = "https://www.etebase.com/";
    description = "A Python client library for Etebase";
    license = licenses.bsd3;
    maintainers = with maintainers; [ _3699n ];
  };
}