From 35259437a7b13f8573f407c39e8c2c0308123a37 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 19 Apr 2019 11:39:38 +0100 Subject: 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. --- gnu/packages/perl.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 86d07c3ccc..cde75bc06e 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -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) -- cgit 1.4.1