summary refs log tree commit diff
path: root/pkgs/development/libraries/libical
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-03-26 17:29:57 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-03-26 17:29:57 -0700
commit5e790f0e177494a2b7dcc5b737f9cc67fbf14a42 (patch)
tree81dd7c15a67914c5079ee778fe3e851e125c6f9f /pkgs/development/libraries/libical
parent611a4bfc0dfefc8388a5026fc1490247bdc3ac55 (diff)
downloadnixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar.gz
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar.bz2
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar.lz
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar.xz
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.tar.zst
nixpkgs-5e790f0e177494a2b7dcc5b737f9cc67fbf14a42.zip
libical: 1.0.0 -> 1.0.1
Diffstat (limited to 'pkgs/development/libraries/libical')
-rw-r--r--pkgs/development/libraries/libical/default.nix24
-rw-r--r--pkgs/development/libraries/libical/respect-env-tzdir.patch16
2 files changed, 25 insertions, 15 deletions
diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix
index dbb104546ad..6292318d5ca 100644
--- a/pkgs/development/libraries/libical/default.nix
+++ b/pkgs/development/libraries/libical/default.nix
@@ -1,13 +1,25 @@
-{stdenv, fetchurl, perl, cmake}:
+{ stdenv, fetchFromGitHub, perl, cmake }:
 
 stdenv.mkDerivation rec {
-  pName = "libical";
-  name = "${pName}-1.0";
-  src = fetchurl {
-    url = "mirror://sourceforge/freeassociation/${pName}/${name}/${name}.tar.gz";
-    sha256 = "1dy0drz9hy0sn2q3s2lp00jb9bis5gsm7n3m4zga49s9ir2b6fbw";
+  name = "libical-${version}";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "libical";
+    repo = "libical";
+    rev = "v${version}";
+    sha256 = "1y6rbw24m133d984pyqzx2bi7f37dsw6f33l6arwn6yd4zlqdib9";
   };
+
   nativeBuildInputs = [ perl cmake ];
 
   patches = [ ./respect-env-tzdir.patch ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/libical/libical;
+    description = "an Open Source implementation of the iCalendar protocols";
+    license = licenses.mpl10;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ wkennington ];
+  };
 }
diff --git a/pkgs/development/libraries/libical/respect-env-tzdir.patch b/pkgs/development/libraries/libical/respect-env-tzdir.patch
index 12da8d41c7b..980a0d5c71a 100644
--- a/pkgs/development/libraries/libical/respect-env-tzdir.patch
+++ b/pkgs/development/libraries/libical/respect-env-tzdir.patch
@@ -1,21 +1,19 @@
-* Remove /usr/*/zoneinfo from the default search path
-* Respect $TZDIR
 diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c
-index adf7598..d2fd5c8 100644
+index fe984c9..22ba0a1 100644
 --- a/src/libical/icaltz-util.c
 +++ b/src/libical/icaltz-util.c
-@@ -108,7 +108,7 @@ typedef struct
- 
- static int r_pos [] = {1, 2, 3, -2, -1};
+@@ -107,7 +107,7 @@ typedef struct
+ 	char	charcnt[4];			
+ } tzinfo; 
  
 -static char *search_paths [] = {"/usr/share/zoneinfo","/usr/lib/zoneinfo","/etc/zoneinfo","/usr/share/lib/zoneinfo"};
 +static char *search_paths [] = {"/etc/zoneinfo"};
  static char *zdir = NULL;
  
  #define NUM_SEARCH_PATHS (sizeof (search_paths)/ sizeof (search_paths [0]))
-@@ -195,6 +195,16 @@ set_zonedir (void)
+@@ -194,6 +194,16 @@ set_zonedir (void)
  	const char *fname = ZONES_TAB_SYSTEM_FILENAME;
- 	int i;	
+ 	unsigned int i;
  
 +	const char *env_tzdir = strdup (getenv ("TZDIR"));
 +	if (env_tzdir) {
@@ -27,6 +25,6 @@ index adf7598..d2fd5c8 100644
 +		free (env_tzdir);
 +	}
 +
- 	for (i = 0;i < NUM_SEARCH_PATHS; i++) {
+ 	for (i = 0; i < NUM_SEARCH_PATHS; i++) {
  		sprintf (file_path, "%s/%s", search_paths [i], fname);
  		if (!access (file_path, F_OK|R_OK)) {