diff mbox

[v5,12/17] gnu: Add perl-geo-ip.

Message ID 20160728213833.22057-13-dannym@scratchpost.org
State New
Headers show

Commit Message

Danny Milosavljevic July 28, 2016, 9:38 p.m. UTC
gnu: Add perl-geo-ip.

* gnu/packages/networking.scm (perl-geo-ip): Add variable.
---
 gnu/packages/networking.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Leo Famulari Aug. 8, 2016, 7:46 p.m. UTC | #1
On Thu, Jul 28, 2016 at 11:38:28PM +0200, Danny Milosavljevic wrote:
> 
> gnu: Add perl-geo-ip.
> 
> * gnu/packages/networking.scm (perl-geo-ip): Add variable.
> ---
>  gnu/packages/networking.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 

> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 134ad5d..660c025 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -588,3 +588,27 @@ offline emulation of DNS.")
>      "Perl extension for merging IPv4 or IPv6 CIDR addresses")
>    (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
>    (license license:gpl1+)))
> +
> +;; TODO: Use the geolite-mirror-simple.pl script from the example
> +;; directory to stay current with the databases. How?

Good question. Any progress? I don't think it should block the package,
right?
Danny Milosavljevic Aug. 8, 2016, 10:50 p.m. UTC | #2
On Mon, 8 Aug 2016 15:46:16 -0400
Leo Famulari <leo@famulari.name> wrote:

> On Thu, Jul 28, 2016 at 11:38:28PM +0200, Danny Milosavljevic wrote:
> > +;; TODO: Use the geolite-mirror-simple.pl script from the example
> > +;; directory to stay current with the databases. How?  
> 
> Good question. Any progress? 

Not really. The same problem should have existed with (glibc) timezone files, leap seconds and hddtemp config data. How has it been handled there?

(Aha, hddtemp is missing entirely)

> I don't think it should block the package, right?

No. I think that geoip locations are approximate anyway, so whether or not the database is up to date is not so important.
diff mbox

Patch

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 134ad5d..660c025 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -588,3 +588,27 @@  offline emulation of DNS.")
     "Perl extension for merging IPv4 or IPv6 CIDR addresses")
   (description "Net::CIDR::Lite merges IPv4 or IPv6 CIDR addresses.")
   (license license:gpl1+)))
+
+;; TODO: Use the geolite-mirror-simple.pl script from the example
+;; directory to stay current with the databases. How?
+(define-public perl-geo-ip
+ (package
+  (name "perl-geo-ip")
+  (version "1.45")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-"
+             version
+             ".tar.gz"))
+      (sha256
+        (base32
+          "0qinkq2br1cjicbgqb5bvrhm73h7f9f4fgc6bjfs5r6x7316bdqf"))))
+  (build-system perl-build-system)
+  (home-page "http://search.cpan.org/dist/Geo-IP")
+  (synopsis
+    "Look up location and network information by IP Address in Perl")
+  (description "The Perl module 'Geo::IP'. 
+It looks up location and network information by IP Address.")
+  (license (package-license perl))))