vdirsyncer: Convert to a python module (#87865)
* vdirsyncer: standardize derivation Use toPythonApplication and use callPackage from python-packages.nix. Make vdirsyncerStable somewhat functional again, but mark it as broken for Python 3.6 or higher. * vdirsyncer: use buildPythonPackage as it's a package now * vdirsyncer: move to python-modules/ * vdirsyncer: Move disabled logic into expression
This commit is contained in:
parent
6c195563e1
commit
b3e7e67a5e
|
@ -1,11 +1,36 @@
|
||||||
{ stdenv, python3Packages, fetchFromGitHub, fetchpatch, rustPlatform, pkgconfig, openssl, CoreServices, Security }:
|
{ stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, isPy27
|
||||||
|
, fetchpatch
|
||||||
|
, rustPlatform
|
||||||
|
, pkg-config
|
||||||
|
, openssl
|
||||||
|
, CoreServices
|
||||||
|
, Security
|
||||||
|
, click
|
||||||
|
, click-log
|
||||||
|
, click-threading
|
||||||
|
, requests_toolbelt
|
||||||
|
, requests
|
||||||
|
, requests_oauthlib # required for google oauth sync
|
||||||
|
, atomicwrites
|
||||||
|
, milksnake
|
||||||
|
, shippai
|
||||||
|
, hypothesis
|
||||||
|
, pytest
|
||||||
|
, pytest-localserver
|
||||||
|
, pytest-subtesthack
|
||||||
|
, setuptools_scm
|
||||||
|
}:
|
||||||
|
|
||||||
# Packaging documentation at:
|
# Packaging documentation at:
|
||||||
# https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst
|
# https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst
|
||||||
python3Packages.buildPythonApplication rec {
|
buildPythonPackage rec {
|
||||||
version = "unstable-2018-08-05";
|
version = "unstable-2018-08-05";
|
||||||
pname = "vdirsyncer";
|
pname = "vdirsyncer";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "spk";
|
owner = "spk";
|
||||||
|
@ -20,11 +45,11 @@ python3Packages.buildPythonApplication rec {
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "source/rust";
|
sourceRoot = "source/rust";
|
||||||
cargoSha256 = "0cqy0s55pkg6hww86h7qip4xaidh6g8lcypdj84n2x374jq38c5d";
|
cargoSha256 = "0cqy0s55pkg6hww86h7qip4xaidh6g8lcypdj84n2x374jq38c5d";
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
|
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = [
|
||||||
click click-log click-threading
|
click click-log click-threading
|
||||||
requests_toolbelt
|
requests_toolbelt
|
||||||
requests
|
requests
|
||||||
|
@ -34,9 +59,16 @@ python3Packages.buildPythonApplication rec {
|
||||||
shippai
|
shippai
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [ setuptools_scm ];
|
nativeBuildInputs = [
|
||||||
|
setuptools_scm
|
||||||
|
];
|
||||||
|
|
||||||
checkInputs = with python3Packages; [ hypothesis pytest pytest-localserver pytest-subtesthack ];
|
checkInputs = [
|
||||||
|
hypothesis
|
||||||
|
pytest
|
||||||
|
pytest-localserver
|
||||||
|
pytest-subtesthack
|
||||||
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(fetchpatch {
|
(fetchpatch {
|
|
@ -1,17 +1,38 @@
|
||||||
{ lib, python3Packages, fetchpatch }:
|
{ stdenv
|
||||||
|
, pythonAtLeast
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, isPy27
|
||||||
|
, fetchpatch
|
||||||
|
, click
|
||||||
|
, click-log
|
||||||
|
, click-threading
|
||||||
|
, requests_toolbelt
|
||||||
|
, requests
|
||||||
|
, requests_oauthlib # required for google oauth sync
|
||||||
|
, atomicwrites
|
||||||
|
, milksnake
|
||||||
|
, shippai
|
||||||
|
, hypothesis
|
||||||
|
, pytest
|
||||||
|
, pytest-localserver
|
||||||
|
, pytest-subtesthack
|
||||||
|
, setuptools_scm
|
||||||
|
}:
|
||||||
|
|
||||||
# Packaging documentation at:
|
# Packaging documentation at:
|
||||||
# https://github.com/pimutils/vdirsyncer/blob/0.16.7/docs/packaging.rst
|
# https://github.com/pimutils/vdirsyncer/blob/0.16.7/docs/packaging.rst
|
||||||
python3Packages.buildPythonApplication rec {
|
buildPythonPackage rec {
|
||||||
version = "0.16.7";
|
version = "0.16.7";
|
||||||
pname = "vdirsyncer";
|
pname = "vdirsyncer";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "6c9bcfb9bcb01246c83ba6f8551cf54c58af3323210755485fc23bb7848512ef";
|
sha256 = "6c9bcfb9bcb01246c83ba6f8551cf54c58af3323210755485fc23bb7848512ef";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = [
|
||||||
click click-log click-threading
|
click click-log click-threading
|
||||||
requests_toolbelt
|
requests_toolbelt
|
||||||
requests
|
requests
|
||||||
|
@ -19,9 +40,16 @@ python3Packages.buildPythonApplication rec {
|
||||||
atomicwrites
|
atomicwrites
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = with python3Packages; [ setuptools_scm ];
|
nativeBuildInputs = [
|
||||||
|
setuptools_scm
|
||||||
|
];
|
||||||
|
|
||||||
checkInputs = with python3Packages; [ hypothesis pytest pytest-localserver pytest-subtesthack ];
|
checkInputs = [
|
||||||
|
hypothesis
|
||||||
|
pytest
|
||||||
|
pytest-localserver
|
||||||
|
pytest-subtesthack
|
||||||
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Fixes for hypothesis: https://github.com/pimutils/vdirsyncer/pull/779
|
# Fixes for hypothesis: https://github.com/pimutils/vdirsyncer/pull/779
|
||||||
|
@ -42,11 +70,19 @@ python3Packages.buildPythonApplication rec {
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
make DETERMINISTIC_TESTS=true PYTEST_ARGS="--deselect=tests/system/cli/test_sync.py::test_verbosity" test
|
make DETERMINISTIC_TESTS=true PYTEST_ARGS="--deselect=tests/system/cli/test_sync.py::test_verbosity" test
|
||||||
'';
|
'';
|
||||||
|
# Tests started to fail lately, for any python version even as low as 3.5 but
|
||||||
|
# if you enable the check, you'll see even severer errors with a higher then
|
||||||
|
# 3.5 python version. Hence it's marked as broken for higher then 3.5 and the
|
||||||
|
# checks are disabled unconditionally. As a general end user advice, use the
|
||||||
|
# normal "unstable" `vdirsyncer` derivation, not this one.
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/pimutils/vdirsyncer";
|
homepage = "https://github.com/pimutils/vdirsyncer";
|
||||||
description = "Synchronize calendars and contacts";
|
description = "Synchronize calendars and contacts";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
# vdirsyncer (unstable) works with mainline python versions
|
||||||
|
broken = (pythonAtLeast "3.6");
|
||||||
maintainers = with maintainers; [ loewenheim ];
|
maintainers = with maintainers; [ loewenheim ];
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -22369,11 +22369,9 @@ in
|
||||||
|
|
||||||
vcv-rack = callPackage ../applications/audio/vcv-rack { };
|
vcv-rack = callPackage ../applications/audio/vcv-rack { };
|
||||||
|
|
||||||
vdirsyncer = callPackage ../tools/misc/vdirsyncer {
|
vdirsyncer = with python3Packages; toPythonApplication vdirsyncer;
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
|
|
||||||
};
|
|
||||||
|
|
||||||
vdirsyncerStable = callPackage ../tools/misc/vdirsyncer/stable.nix { };
|
vdirsyncerStable = with python3Packages; toPythonApplication vdirsyncerStable;
|
||||||
|
|
||||||
vdpauinfo = callPackage ../tools/X11/vdpauinfo { };
|
vdpauinfo = callPackage ../tools/X11/vdpauinfo { };
|
||||||
|
|
||||||
|
|
|
@ -1607,6 +1607,13 @@ in {
|
||||||
|
|
||||||
vdf = callPackage ../development/python-modules/vdf { };
|
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 { };
|
||||||
|
|
||||||
vidstab = callPackage ../development/python-modules/vidstab { };
|
vidstab = callPackage ../development/python-modules/vidstab { };
|
||||||
|
|
||||||
webapp2 = callPackage ../development/python-modules/webapp2 { };
|
webapp2 = callPackage ../development/python-modules/webapp2 { };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user