mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
defaultGemConfig.tzinfo: fix for >=2.0 (#54881)
This commit is contained in:
parent
c6d32974a0
commit
eaf0b5e595
1 changed files with 10 additions and 4 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue