Patchwork [v5,06/17] gnu: Add perl-net-patricia.

login
register
mail settings
Submitter Danny Milosavljevic
Date July 28, 2016, 9:38 p.m.
Message ID <20160728213833.22057-7-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/14125/
State New
Headers show

Comments

Danny Milosavljevic - July 28, 2016, 9:38 p.m.
gnu: Add perl-net-patricia.

* gnu/packages/networking.scm (perl-net-patricia): Add variable.
---
 gnu/packages/networking.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
Leo Famulari - Aug. 8, 2016, 7:44 p.m.
On Thu, Jul 28, 2016 at 11:38:22PM +0200, Danny Milosavljevic wrote:
> 
> gnu: Add perl-net-patricia.
> 
> * gnu/packages/networking.scm (perl-net-patricia): Add variable.
> ---
>  gnu/packages/networking.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 

> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index b575fce..0312fe5 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -535,3 +535,34 @@ offline emulation of DNS.")
>      "Manages IPv4 and IPv6 addresses and subnets")
>    (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
>    (license (package-license perl))))
> +
> +;; Maybe makes sense to add patricialib dependency (it's bundled right now).
> +;; See <http://www.mrtd.net/> for the original package it was extracted from.
> +;; However, the site above doesn't actually work on my computer.

I will drop this comment unless you object. No need to send an updated
patch. And, the original site appears to be offline, with a
"cyber-squatter" on the domain.
Danny Milosavljevic - Aug. 8, 2016, 9:09 p.m.
> I will drop this comment unless you object.

Ok!

Patch

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index b575fce..0312fe5 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -535,3 +535,34 @@  offline emulation of DNS.")
     "Manages IPv4 and IPv6 addresses and subnets")
   (description "NetAddr::IP manages IPv4 and IPv6 addresses and subsets.")
   (license (package-license perl))))
+
+;; Maybe makes sense to add patricialib dependency (it's bundled right now).
+;; See <http://www.mrtd.net/> for the original package it was extracted from.
+;; However, the site above doesn't actually work on my computer.
+(define-public perl-net-patricia
+ (package
+  (name "perl-net-patricia")
+  (version "1.22")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append
+             "mirror://cpan/authors/id/G/GR/GRUBER/Net-Patricia-"
+             version
+             ".tar.gz"))
+      (sha256
+        (base32
+          "0ln5f57vc8388kyh9vhx2infrdzfhbpgyby74h1qsnhwds95m0vh"))))
+  (build-system perl-build-system)
+  (inputs
+    `(("perl-net-cidr-lite" ,perl-net-cidr-lite)
+      ("perl-socket6" ,perl-socket6)))
+  (home-page
+    "http://search.cpan.org/dist/Net-Patricia")
+  (synopsis
+    "Patricia Trie Perl module for fast IP address lookups")
+  (description
+    "Net::Patricia does IP address lookups quickly in Perl.")
+  ;; The bindings are licensed under GPL2 or later.
+  ;; libpatricia is licensed under 2-clause BSD.
+  (license (list license:gpl2+ license:bsd-2))))