diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index d007f03ac44..4344511a387 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -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"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c58203cc481..807a4bcdd9b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/etesync-dav.nix b/nixos/tests/etesync-dav.nix new file mode 100644 index 00000000000..286f919aa8c --- /dev/null +++ b/nixos/tests/etesync-dav.nix @@ -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/") + ''; +}) diff --git a/pkgs/applications/misc/etesync-dav/default.nix b/pkgs/applications/misc/etesync-dav/default.nix index 5e3a85c3b93..0cbb3cc75a7 100644 --- a/pkgs/applications/misc/etesync-dav/default.nix +++ b/pkgs/applications/misc/etesync-dav/default.nix @@ -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/"; diff --git a/pkgs/development/python-modules/etebase/default.nix b/pkgs/development/python-modules/etebase/default.nix new file mode 100644 index 00000000000..366c447ed94 --- /dev/null +++ b/pkgs/development/python-modules/etebase/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 79a3b377279..ff4fe6e1510 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { };