Add geolite-legacy 2015-03-26
The geoip package only installs a GeoIP _library_ which is useless without a GeoIP _database_. The only package to currently install such a database is ntopng, which manually downloads Maxmind's GeoLite Legacy files to a private location. Provide these as a separate package so other packages can use them as well.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
source "$stdenv/setup"
|
||||
|
||||
mkdir -p $out/share/GeoIP
|
||||
cd $out/share/GeoIP
|
||||
|
||||
# Iterate over all environment variable names beginning with "src":
|
||||
for var in "${!src@}"; do
|
||||
# Store the value of the variable with name $var in $src:
|
||||
eval src="\$$var"
|
||||
|
||||
# Copy $src to current directory, removing Nix hash from the filename:
|
||||
dest="${src##*/}"
|
||||
dest="${dest#*-}"
|
||||
cp "$src" "$dest"
|
||||
done
|
||||
|
||||
gunzip -v *.gz
|
||||
Reference in New Issue
Block a user