Merge pull request #105519 from 3699n/master

This commit is contained in:
Sandro 2020-12-07 19:54:20 +01:00 committed by GitHub
commit 04cb54ae08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 97 additions and 13 deletions

View file

@ -64,6 +64,12 @@
githubId = 791309;
name = "Jan Hrnko";
};
_3699n = {
email = "nicholas@nvk.pm";
github = "3699n";
githubId = 7414843;
name = "Nicholas von Klitzing";
};
a1russell = {
email = "adamlr6+pub@gmail.com";
github = "a1russell";

View file

@ -103,6 +103,7 @@ in
ergo = handleTest ./ergo.nix {};
etcd = handleTestOn ["x86_64-linux"] ./etcd.nix {};
etcd-cluster = handleTestOn ["x86_64-linux"] ./etcd-cluster.nix {};
etesync-dav = handleTest ./etesync-dav.nix {};
fancontrol = handleTest ./fancontrol.nix {};
fcitx = handleTest ./fcitx {};
ferm = handleTest ./ferm.nix {};

View file

@ -0,0 +1,21 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "etesync-dav";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ _3699n ];
};
machine = { config, pkgs, ... }: {
environment.systemPackages = [ pkgs.curl pkgs.etesync-dav ];
};
testScript =
''
machine.wait_for_unit("multi-user.target")
machine.succeed("etesync-dav --version")
machine.execute("etesync-dav &")
machine.wait_for_open_port(37358)
with subtest("Check that the web interface is accessible"):
assert "Add User" in machine.succeed("curl -s http://localhost:37358/.web/add/")
'';
})

View file

@ -2,31 +2,22 @@
python3Packages.buildPythonApplication rec {
pname = "etesync-dav";
version = "0.20.0";
version = "0.30.6";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "1q8h89hqi4kxphn1g5nbcia0haz5k57is9rycwaabm55mj9s9fah";
sha256 = "0cjz4p3a750fwvrxbzwda0sidw7nscahvppdshbsx49i6qrczpbg";
};
postPatch = ''
substituteInPlace setup.py --replace "Radicale==" "Radicale>="
'';
propagatedBuildInputs = with python3Packages; [
etebase
etesync
flask
flask_wtf
radicale3
];
checkInputs = with python3Packages; [
pytest
];
checkPhase = ''
pytest
'';
doCheck = false;
meta = with lib; {
homepage = "https://www.etesync.com/";

View file

@ -0,0 +1,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 ];
};
}

View file

@ -1957,6 +1957,10 @@ in {
etelemetry = callPackage ../development/python-modules/etelemetry { };
etebase = callPackage ../development/python-modules/etebase {
inherit (pkgs.darwin.apple_sdk.frameworks) Security;
};
etesync = callPackage ../development/python-modules/etesync { };
eth-hash = callPackage ../development/python-modules/eth-hash { };