Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, icalendar 6, lxml 7, mock 8, nose 9, pytz 10, requests 11, six 12, tzlocal 13, vobject 14}: 15 16buildPythonPackage rec { 17 pname = "caldav"; 18 version = "0.7.0"; 19 20 src = fetchFromGitHub { 21 owner = "python-caldav"; 22 repo = pname; 23 rev = "v${version}"; 24 sha256 = "0m64maiqp3k8fsgkkvdx1dlfhkc70pqig4dclq6w8ajz82czrq83"; 25 }; 26 27 nativeBuildInputs = lib.optionals (pythonOlder "3.5") [ mock ]; 28 propagatedBuildInputs = [ six requests vobject lxml ] 29 ++ lib.optionals (pythonOlder "3.6") [ pytz tzlocal ]; 30 31 checkInputs = [ 32 icalendar 33 nose 34 tzlocal 35 ]; 36 37 # xandikos and radicale is only a optional test dependency, not available for python3 38 postPatch = '' 39 substituteInPlace setup.py \ 40 --replace ", 'xandikos'" "" \ 41 --replace ", 'radicale'" "" 42 ''; 43 44 pythonImportsCheck = [ "caldav" ]; 45 46 meta = with lib; { 47 description = "This project is a CalDAV (RFC4791) client library for Python."; 48 homepage = "https://pythonhosted.org/caldav/"; 49 license = licenses.asl20; 50 maintainers = with maintainers; [ marenz ]; 51 #broken = true; # requires radicale which is not packaged yet 52 }; 53}