lol

fix(tzdata): prepend to ZONE_SOURCES instead of substituting in place

+19 -4
+7 -4
pkgs/development/compilers/crystal/default.nix
··· 4 4 , fetchurl 5 5 , fetchpatch 6 6 , lib 7 + , substituteAll 7 8 # Dependencies 8 9 , boehmgc 9 10 , coreutils ··· 100 101 inherit sha256; 101 102 }; 102 103 103 - patches = [ ] 104 + patches = [ 105 + (substituteAll { 106 + src = ./tzdata.patch; 107 + inherit tzdata; 108 + }) 109 + ] 104 110 ++ lib.optionals (lib.versionOlder version "1.2.0") [ 105 111 # add support for DWARF5 debuginfo, fixes builds on recent compilers 106 112 # the PR is 8 commits from 2019, so just fetch the whole thing ··· 123 129 # https://github.com/crystal-lang/crystal/pull/8792#issuecomment-614004782 124 130 substituteInPlace Makefile \ 125 131 --replace 'docs: ## Generate standard library documentation' 'docs: crystal ## Generate standard library documentation' 126 - 127 - substituteInPlace src/crystal/system/unix/time.cr \ 128 - --replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo 129 132 130 133 mkdir -p $TMP/crystal 131 134
+12
pkgs/development/compilers/crystal/tzdata.patch
··· 1 + diff --git a/src/crystal/system/unix/time.cr b/src/crystal/system/unix/time.cr 2 + index 333b66075..1c29a0e55 100644 3 + --- a/src/crystal/system/unix/time.cr 4 + +++ b/src/crystal/system/unix/time.cr 5 + @@ -43,6 +43,7 @@ module Crystal::System::Time 6 + # Many systems use /usr/share/zoneinfo, Solaris 2 has 7 + # /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ. 8 + ZONE_SOURCES = { 9 + + "@tzdata@/share/zoneinfo/", 10 + "/usr/share/zoneinfo/", 11 + "/usr/share/lib/zoneinfo/", 12 + "/usr/lib/locale/TZ/",