defaultGemConfig.tzinfo: fix for >=2.0 (#54881)

This commit is contained in:
Alyssa Ross 2019-01-29 20:30:56 +00:00 committed by zimbatm
parent c6d32974a0
commit eaf0b5e595

View file

@ -425,10 +425,16 @@ in
tzinfo = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
dontBuild = false;
postPatch = ''
substituteInPlace lib/tzinfo/zoneinfo_data_source.rb \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
'';
postPatch =
let
path = if lib.versionAtLeast attrs.version "2.0"
then "lib/tzinfo/data_sources/zoneinfo_data_source.rb"
else "lib/tzinfo/zoneinfo_data_source.rb";
in
''
substituteInPlace ${path} \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
'';
};
uuid4r = attrs: {