gnu: perl-datetime-timezone: Fix missing timezone data.

I noticed this when using Sqitch, on systems without /usr/share/zoneinfo,
actions like deploy fail.

* gnu/packages/perl.scm (perl-datetime-timezone)[arguments]: Add 'patch-tzdata
phase to replace /usr/share/zoneinfo with a reference to the tzdata package.
[inputs]: Add the tzdata package.
master
Christopher Baines 2019-04-19 11:39:38 +01:00
parent f32164abd3
commit 35259437a7
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
1 changed files with 13 additions and 0 deletions

View File

@ -2541,9 +2541,22 @@ the DateTime.pm class.")
(base32
"0kz5kz47awf2bhb85xx5rbajkr093ipm2d2vkhqs8lqq0f305r3a"))))
(build-system perl-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-tzdata
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib/DateTime/TimeZone/Local/Unix.pm"
(("our \\$ZoneinfoDir = '\\/usr\\/share\\/zoneinfo';")
(string-append "our $ZoneinfoDir = '"
(assoc-ref inputs "tzdata") "/share/zoneinfo"
"';")))
#t)))))
(native-inputs
`(("perl-test-fatal" ,perl-test-fatal)
("perl-test-requires" ,perl-test-requires)))
(inputs
`(("tzdata" ,tzdata)))
(propagated-inputs
`(("perl-class-singleton" ,perl-class-singleton)
("perl-list-allutils" ,perl-list-allutils)