diff options
| author | Antero Mejr <antero@mailbox.org> | 2023-06-04 17:42:42 +0000 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2024-12-22 13:19:03 +0100 |
| commit | b96721b7bde8dafe426dd0a29c246d9460bd911a (patch) | |
| tree | 6bb8718f7a7c8728287edb75ba7719d3cebdf76e /gnu | |
| parent | 4dc4e057b44f9171975ffaf066fd884c754c325b (diff) | |
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.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/perl-web.scm b/gnu/packages/perl-web.scm index 393cbc4d06d..83bf1448ab7 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 | |||
| 260 | of their databases. It is intended only as a compatability package for | 260 | of their databases. It is intended only as a compatability package for |
| 261 | SpamAssassin.") | 261 | SpamAssassin.") |
| 262 | (license license:cc-by-sa4.0)))) | 262 | (license license:cc-by-sa4.0)))) |
| 263 | |||
| 264 | (define-public perl-geo-ip | ||
| 265 | (package | ||
| 266 | (name "perl-geo-ip") | ||
| 267 | (version "1.51") | ||
| 268 | (source (origin | ||
| 269 | (method url-fetch) | ||
| 270 | (uri (string-append | ||
| 271 | "mirror://cpan/authors/id/M/MA/MAXMIND/Geo-IP-" | ||
| 272 | version ".tar.gz")) | ||
| 273 | (sha256 | ||
| 274 | (base32 | ||
| 275 | "1fka8fr7fw6sh3xa9glhs1zjg3s2gfkhi7n7da1l2m2wblqj0c0n")))) | ||
| 276 | (build-system perl-build-system) | ||
| 277 | (arguments | ||
| 278 | (list #:phases #~(modify-phases %standard-phases | ||
| 279 | (add-after 'unpack 'patch | ||
| 280 | (lambda _ | ||
| 281 | (substitute* "lib/Geo/IP.pm" | ||
| 282 | (("/usr/local/share/GeoIP/GeoIP.dat") | ||
| 283 | (string-append | ||
| 284 | #$(this-package-input "geolite-country-data") | ||
| 285 | "/share/GeoIP/GeoIP.dat")))))))) | ||
| 286 | (inputs (list geolite-country-data)) | ||
| 287 | (home-page "https://metacpan.org/release/Geo-IP") | ||
| 288 | (synopsis "Look up location and network information by IP Address") | ||
| 289 | (description | ||
| 290 | "The Perl module @code{Geo::IP} looks up location and network information | ||
| 291 | by IP Address.") | ||
| 292 | (license license:perl-license))) | ||
