aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAntero Mejr <antero@mailbox.org>2023-06-04 17:42:42 +0000
committerDanny Milosavljevic <dannym@friendly-machines.com>2024-12-22 13:19:03 +0100
commitb96721b7bde8dafe426dd0a29c246d9460bd911a (patch)
tree6bb8718f7a7c8728287edb75ba7719d3cebdf76e /gnu
parent4dc4e057b44f9171975ffaf066fd884c754c325b (diff)
downloadguix-b96721b7bde8dafe426dd0a29c246d9460bd911a.tar.gz
guix-b96721b7bde8dafe426dd0a29c246d9460bd911a.zip
gnu: Add perl-geo-ip.
* gnu/packages/perl-web.scm (perl-geo-ip): New variable. Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/perl-web.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/perl-web.scm b/gnu/packages/perl-web.scm
index 393cbc4d06..83bf1448ab 100644
--- a/gnu/packages/perl-web.scm
+++ b/gnu/packages/perl-web.scm
@@ -260,3 +260,33 @@ format. The data was collected before MaxMind changed the license and format
of their databases. It is intended only as a compatability package for
SpamAssassin.")
(license license:cc-by-sa4.0))))
+
+(define-public perl-geo-ip
+ (package
+ (name "perl-geo-ip")
+ (version "1.51")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n"))))
+ (build-system perl-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda _
+ (substitute* "lib/Geo/IP.pm"
+ (("/usr/local/share/GeoIP/GeoIP.dat")
+ (string-append
+ #$(this-package-input "geolite-country-data")
+ "/share/GeoIP/GeoIP.dat"))))))))
+ (inputs (list geolite-country-data))
+ (home-page "https://metacpan.org/release/Geo-IP")
+ (synopsis "Look up location and network information by IP Address")
+ (description
+ "The Perl module @code{Geo::IP} looks up location and network information
+by IP Address.")
+ (license license:perl-license)))