Subject: [bug#72810] [PATCH 4/4] gnu: Add go-github-com-libp2p-go-cidranger.

From: "Artyom V. Poptsov" <[email-masked]>
Date: Mon, 26 Aug 2024 00:23:37 +0300

* gnu/packages/golang-web.scm (go-github-com-libp2p-go-cidranger): New variable.

Change-Id: I4e21f87c7b77ae8a5f7fa2e098330ec15bff079e
---
 gnu/packages/golang-web.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 288d81b7dd..ab5333cf6e 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -2201,6 +2201,36 @@ (define-public go-github-com-koron-go-ssdp
 @acronym{Simple Service Discovery Protocol, SSDP}} library for Golang.")
     (license license:expat)))
 
+(define-public go-github-com-libp2p-go-cidranger
+  (package
+    (name "go-github-com-libp2p-go-cidranger")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/libp2p/go-cidranger")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "05hzlk5hx7qna5znr3q1crr0qb7h8yrv1v96pj015dh0kbdkdaba"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/libp2p/go-cidranger"))
+    (native-inputs (list go-github-com-stretchr-testify))
+    (propagated-inputs (list go-github-com-ipfs-go-detect-race))
+    (home-page "https://github.com/libp2p/go-cidranger")
+    (synopsis "Fast IP to CIDR lookup in Golang")
+    (description
+     "Fast IP to @url{https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing,
+CIDR} block(s) lookup using trie in Golang, inspired by
+@url{https://vincent.bernat.im/en/blog/2017-ipv4-route-lookup-linux, IPv4 route
+lookup Linux}.  Possible use cases include detecting if a IP address is from
+published cloud provider CIDR blocks (e.g. 52.95.110.1 is contained in published AWS
+Route53 CIDR 52.95.110.0/24), IP routing rules, etc.")
+    (license license:expat)))
+
 (define-public go-github-com-libp2p-go-libp2p-asn-util
   (package
     (name "go-github-com-libp2p-go-libp2p-asn-util")
-- 
2.45.2