diff --git a/pkgs/development/python-modules/vdirsyncer/default.nix b/pkgs/development/python-modules/vdirsyncer/default.nix index 1a5494634bb03..6e1dc98256702 100644 --- a/pkgs/development/python-modules/vdirsyncer/default.nix +++ b/pkgs/development/python-modules/vdirsyncer/default.nix @@ -1,13 +1,7 @@ { stdenv , buildPythonPackage -, fetchFromGitHub +, fetchPypi , isPy27 -, fetchpatch -, rustPlatform -, pkg-config -, openssl -, CoreServices -, Security , click , click-log , click-threading @@ -15,38 +9,21 @@ , requests , requests_oauthlib # required for google oauth sync , atomicwrites -, milksnake -, shippai , hypothesis -, pytest +, pytestCheckHook , pytest-localserver , pytest-subtesthack , setuptools_scm }: -# Packaging documentation at: -# https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst buildPythonPackage rec { - version = "unstable-2018-08-05"; + version = "0.16.8"; pname = "vdirsyncer"; - name = "${pname}-${version}"; disabled = isPy27; - src = fetchFromGitHub { - owner = "spk"; - repo = pname; - # fix-build-style branch, see https://github.com/pimutils/vdirsyncer/pull/798 - rev = "2c62d03bd73f8b44a47c2e769ade046697896ae9"; - sha256 = "1q6xvzz5rf5sqdaj3mdvhpgwy5b16isavgg7vardgjwqwv1yal28"; - }; - - native = rustPlatform.buildRustPackage { - name = "${name}-native"; - inherit src; - sourceRoot = "source/rust"; - cargoSha256 = "0cqy0s55pkg6hww86h7qip4xaidh6g8lcypdj84n2x374jq38c5d"; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ]; + src = fetchPypi { + inherit pname version; + sha256 = "bfdb422f52e1d4d60bd0635d203fb59fa7f613397d079661eb48e79464ba13c5"; }; propagatedBuildInputs = [ @@ -55,8 +32,6 @@ buildPythonPackage rec { requests requests_oauthlib # required for google oauth sync atomicwrites - milksnake - shippai ]; nativeBuildInputs = [ @@ -65,45 +40,25 @@ buildPythonPackage rec { checkInputs = [ hypothesis - pytest + pytestCheckHook pytest-localserver pytest-subtesthack ]; - patches = [ - (fetchpatch { - url = "https://github.com/pimutils/vdirsyncer/commit/7b636e8e40d69c495901f965b9c0686513659e44.patch"; - sha256 = "0vl942ii5iad47y63v0ngmhfp37n30nxyk4j7h64b95fk38vfwx9"; - }) - ]; - postPatch = '' - # see https://github.com/pimutils/vdirsyncer/pull/805 - substituteInPlace setup.cfg --replace --duration --durations - - # for setuptools_scm: - echo 'Version: ${version}' >PKG-INFO - - sed -i 's/spec.add_external_build(cmd=cmd/spec.add_external_build(cmd="true"/g' setup.py - - # fixing test - sed -i "s/invalid value for \"--verbosity\"/invalid value for \\\'--verbosity\\\'/" tests/system/cli/test_sync.py + substituteInPlace setup.py --replace "click>=5.0,<6.0" "click" ''; - preBuild = '' - mkdir -p rust/target/release - ln -s ${native}/lib/libvdirsyncer_rustext* rust/target/release/ + preCheck = '' + export DETERMINISTIC_TESTS=true ''; - checkPhase = '' - rm -rf vdirsyncer - make DETERMINISTIC_TESTS=true PYTEST_ARGS="--deselect=tests/unit/utils/test_vobject.py::test_replace_uid --deselect=tests/unit/sync/test_sync.py::TestSyncMachine" test - ''; + disabledTests = [ "test_verbosity" ]; meta = with stdenv.lib; { homepage = "https://github.com/pimutils/vdirsyncer"; description = "Synchronize calendars and contacts"; - maintainers = with maintainers; [ matthiasbeyer gebner ]; license = licenses.mit; + maintainers = with maintainers; [ loewenheim ]; }; } diff --git a/pkgs/development/python-modules/vdirsyncer/stable.nix b/pkgs/development/python-modules/vdirsyncer/stable.nix deleted file mode 100644 index 6e1dc98256702..0000000000000 --- a/pkgs/development/python-modules/vdirsyncer/stable.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ stdenv -, buildPythonPackage -, fetchPypi -, isPy27 -, click -, click-log -, click-threading -, requests_toolbelt -, requests -, requests_oauthlib # required for google oauth sync -, atomicwrites -, hypothesis -, pytestCheckHook -, pytest-localserver -, pytest-subtesthack -, setuptools_scm -}: - -buildPythonPackage rec { - version = "0.16.8"; - pname = "vdirsyncer"; - disabled = isPy27; - - src = fetchPypi { - inherit pname version; - sha256 = "bfdb422f52e1d4d60bd0635d203fb59fa7f613397d079661eb48e79464ba13c5"; - }; - - propagatedBuildInputs = [ - click click-log click-threading - requests_toolbelt - requests - requests_oauthlib # required for google oauth sync - atomicwrites - ]; - - nativeBuildInputs = [ - setuptools_scm - ]; - - checkInputs = [ - hypothesis - pytestCheckHook - pytest-localserver - pytest-subtesthack - ]; - - postPatch = '' - substituteInPlace setup.py --replace "click>=5.0,<6.0" "click" - ''; - - preCheck = '' - export DETERMINISTIC_TESTS=true - ''; - - disabledTests = [ "test_verbosity" ]; - - meta = with stdenv.lib; { - homepage = "https://github.com/pimutils/vdirsyncer"; - description = "Synchronize calendars and contacts"; - license = licenses.mit; - maintainers = with maintainers; [ loewenheim ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 41024876d5543..c8f808654cad7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -643,6 +643,7 @@ mapAliases ({ v8_3_16_14 = throw "v8_3_16_14 was removed in 2019-11-01: no longer referenced by other packages"; valadoc = throw "valadoc was deprecated on 2019-10-10: valadoc was merged into vala 0.38"; vamp = { vampSDK = vamp-plugin-sdk; }; # added 2020-03-26 + vdirsyncerStable = vdirsyncer; # added 2020-11-08, see https://github.com/NixOS/nixpkgs/issues/103026#issuecomment-723428168 vimbWrapper = vimb; # added 2015-01 vimprobable2 = throw "vimprobable2 has been removed from nixpkgs. It relied on webkitgtk24x that has been removed."; # added 2019-12-05 vimprobable2-unwrapped = vimprobable2; # added 2019-12-05 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03be57b914c1d..c609a3645a36d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24034,8 +24034,6 @@ in vdirsyncer = with python3Packages; toPythonApplication vdirsyncer; - vdirsyncerStable = with python3Packages; toPythonApplication vdirsyncerStable; - vdpauinfo = callPackage ../tools/X11/vdpauinfo { }; verbiste = callPackage ../applications/misc/verbiste { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2ef9459b13f91..dc9425211e161 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7483,12 +7483,7 @@ in { vdf = callPackage ../development/python-modules/vdf { }; - vdirsyncer = callPackage ../development/python-modules/vdirsyncer { - inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices Security; - inherit (pkgs) pkg-config openssl rustPlatform; - }; - - vdirsyncerStable = callPackage ../development/python-modules/vdirsyncer/stable.nix { }; + vdirsyncer = callPackage ../development/python-modules/vdirsyncer { }; vega = callPackage ../development/python-modules/vega { };