mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
30 lines
829 B
Diff
30 lines
829 B
Diff
--- a/src/libical/icaltz-util.c
|
|
+++ b/src/libical/icaltz-util.c
|
|
@@ -94,9 +94,9 @@
|
|
static const char *zdir = NULL;
|
|
|
|
static const char *search_paths[] = {
|
|
+ "/etc/zoneinfo",
|
|
"/usr/share/zoneinfo",
|
|
"/usr/lib/zoneinfo",
|
|
- "/etc/zoneinfo",
|
|
"/usr/share/lib/zoneinfo"
|
|
};
|
|
|
|
@@ -178,6 +178,15 @@
|
|
const char *fname = ZONES_TAB_SYSTEM_FILENAME;
|
|
size_t i, num_search_paths;
|
|
|
|
+ const char *env_tzdir = getenv ("TZDIR");
|
|
+ if (env_tzdir) {
|
|
+ sprintf (file_path, "%s/%s", env_tzdir, fname);
|
|
+ if (!access (file_path, F_OK|R_OK)) {
|
|
+ zdir = env_tzdir;
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+
|
|
num_search_paths = sizeof(search_paths) / sizeof(search_paths[0]);
|
|
for (i = 0; i < num_search_paths; i++) {
|
|
snprintf(file_path, MAXPATHLEN, "%s/%s", search_paths[i], fname);
|