diff --git a/pkgs/by-name/vd/vdirsyncer/package.nix b/pkgs/by-name/vd/vdirsyncer/package.nix new file mode 100644 index 000000000000..80f9ef67ce0a --- /dev/null +++ b/pkgs/by-name/vd/vdirsyncer/package.nix @@ -0,0 +1,10 @@ +{ + lib, + python3Packages, +}: + +python3Packages.toPythonApplication ( + python3Packages.vdirsyncer.overridePythonAttrs (old: { + dependencies = old.dependencies ++ lib.concatAttrValues old.optional-dependencies; + }) +) diff --git a/pkgs/development/python-modules/vdirsyncer/default.nix b/pkgs/development/python-modules/vdirsyncer/default.nix index 2b31b2e4b0f7..92a51a2f0678 100644 --- a/pkgs/development/python-modules/vdirsyncer/default.nix +++ b/pkgs/development/python-modules/vdirsyncer/default.nix @@ -5,34 +5,29 @@ fetchpatch, click, click-log, - click-threading, - requests-toolbelt, requests, - atomicwrites, hypothesis, pytestCheckHook, pytest-cov-stub, - pytest-subtesthack, setuptools, setuptools-scm, - wheel, aiostream, aiohttp-oauthlib, aiohttp, pytest-asyncio, trustme, aioresponses, - vdirsyncer, - testers, + nixosTests, + versionCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "vdirsyncer"; version = "0.20.0"; pyproject = true; src = fetchPypi { - inherit pname version; + inherit (finalAttrs) pname version; hash = "sha256-/rGlM1AKlcFP0VVzOhBW/jWRklU9gsB8a6BPy/xAsS0="; }; @@ -42,22 +37,21 @@ buildPythonPackage rec { ]; dependencies = [ - atomicwrites click click-log - click-threading requests - requests-toolbelt aiostream aiohttp - aiohttp-oauthlib ]; + optional-dependencies = { + google = [ aiohttp-oauthlib ]; + }; + nativeCheckInputs = [ hypothesis pytestCheckHook pytest-cov-stub - pytest-subtesthack pytest-asyncio trustme aioresponses @@ -73,14 +67,20 @@ buildPythonPackage rec { "test_verbosity" ]; - passthru.tests.version = testers.testVersion { package = vdirsyncer; }; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + passthru.tests = { + inherit (nixosTests) vdirsyncer; + }; meta = { description = "Synchronize calendars and contacts"; homepage = "https://github.com/pimutils/vdirsyncer"; - changelog = "https://github.com/pimutils/vdirsyncer/blob/v${version}/CHANGELOG.rst"; + changelog = "https://github.com/pimutils/vdirsyncer/blob/v${finalAttrs.version}/CHANGELOG.rst"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ stephen-huan ]; mainProgram = "vdirsyncer"; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dbf846bfadc4..c3cbec3676a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9569,8 +9569,6 @@ with pkgs; uuagc = haskell.lib.compose.justStaticExecutables haskellPackages.uuagc; - vdirsyncer = with python3Packages; toPythonApplication vdirsyncer; - vim = vimUtils.makeCustomizable ( callPackage ../applications/editors/vim { }