dannym pushed a commit to branch master
in repository guix.

commit b96721b7bde8dafe426dd0a29c246d9460bd911a
Author: Antero Mejr <[email protected]>
AuthorDate: Sun Jun 4 17:42:42 2023 +0000

    gnu: Add perl-geo-ip.
    
    * gnu/packages/perl-web.scm (perl-geo-ip): New variable.
    
    Signed-off-by: Danny Milosavljevic <[email protected]>
---
 gnu/packages/perl-web.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

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)))

Reply via email to