summary refs log tree commit diff
path: root/pkgs/development/python-modules/caldav
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-06-12 11:22:39 -0700
committerJonathan Ringer <jonringer117@gmail.com>2020-06-12 11:22:39 -0700
commitdb59d205fefd1981ba80fe43dd7a0d1781ae7734 (patch)
treef70b8d6efd2d9cf4f1db10bcc240c3dc6db6043e /pkgs/development/python-modules/caldav
parent8a67181b7c37b548d4bfb0652e4103549cb70785 (diff)
downloadnixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar.gz
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar.bz2
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar.lz
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar.xz
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.tar.zst
nixpkgs-db59d205fefd1981ba80fe43dd7a0d1781ae7734.zip
python3Packages.caldav: use github, fix build
Diffstat (limited to 'pkgs/development/python-modules/caldav')
-rw-r--r--pkgs/development/python-modules/caldav/default.nix39
1 files changed, 28 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/caldav/default.nix b/pkgs/development/python-modules/caldav/default.nix
index 15c2dd2b0fe..0d96372abfc 100644
--- a/pkgs/development/python-modules/caldav/default.nix
+++ b/pkgs/development/python-modules/caldav/default.nix
@@ -1,34 +1,51 @@
 { lib
 , buildPythonPackage
-, fetchPypi
-, tzlocal
-, requests
-, vobject
+, fetchFromGitHub
+, pythonOlder
+, icalendar
 , lxml
 , nose
+, pytz
+, requests
+, six
+, tzlocal
+, vobject
 }:
 
 buildPythonPackage rec {
   pname = "caldav";
   version = "0.7.0";
 
-  propagatedBuildInputs = [ tzlocal requests vobject lxml nose ];
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "f5982b204fcfac8598381e35e46b667542bd728009971271463f81100e6e5943";
+  src = fetchFromGitHub {
+    owner = "python-caldav";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0m64maiqp3k8fsgkkvdx1dlfhkc70pqig4dclq6w8ajz82czrq83";
   };
 
-  # xandikos is only a optional test dependency, not available for python3
+  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
   postPatch = ''
     substituteInPlace setup.py \
-      --replace ", 'xandikos'" ""
+      --replace ", 'xandikos'" "" \
+      --replace ", 'radicale'" ""
   '';
 
+  pythonImportsCheck = [ "caldav" ];
+
   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
   };
 }