1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/caldav/default.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

2020-04-21 15:41:59 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, icalendar
2020-04-21 15:41:59 +01:00
, lxml
2020-08-18 08:49:30 +01:00
, mock
2020-04-21 15:41:59 +01:00
, nose
, pytz
, requests
, six
, tzlocal
, vobject
2020-04-21 15:41:59 +01:00
}:
2019-04-29 09:49:35 +01:00
buildPythonPackage rec {
pname = "caldav";
version = "0.7.1";
2019-04-29 09:49:35 +01:00
src = fetchFromGitHub {
owner = "python-caldav";
repo = pname;
rev = "v${version}";
sha256 = "1shfj67kq6qzd0ngyfk09hpzfggybcfxv5s7hqs87nq9l51bssv8";
2019-04-29 09:49:35 +01:00
};
2020-08-18 08:49:30 +01:00
nativeBuildInputs = lib.optionals (pythonOlder "3.5") [ mock ];
propagatedBuildInputs = [ six requests vobject lxml ]
++ lib.optionals (pythonOlder "3.6") [ pytz tzlocal ];
checkInputs = [
icalendar
nose
tzlocal
];
# xandikos and radicale is only a optional test dependency, not available for python3
2020-04-21 15:41:59 +01:00
postPatch = ''
substituteInPlace setup.py \
--replace ", 'xandikos'" "" \
--replace ", 'radicale'" ""
2020-04-21 15:41:59 +01:00
'';
pythonImportsCheck = [ "caldav" ];
2019-04-29 09:49:35 +01:00
meta = with lib; {
description = "This project is a CalDAV (RFC4791) client library for Python.";
homepage = "https://pythonhosted.org/caldav/";
license = licenses.asl20;
maintainers = with maintainers; [ marenz ];
#broken = true; # requires radicale which is not packaged yet
2019-04-29 09:49:35 +01:00
};
}