2020-04-24 23:36:52 +00:00
|
|
|
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
|
2021-12-06 16:07:01 +00:00
|
|
|
# Store the value of the variable with name $var in $src:
|
|
|
|
eval src="\$$var"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# Copy $src to current directory, removing Nix hash from the filename:
|
|
|
|
dest="${src##*/}"
|
|
|
|
dest="${dest#*-}"
|
|
|
|
cp "$src" "$dest"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
gzip -dv *.gz
|
|
|
|
|
|
|
|
ln -s GeoLiteCity.dat GeoIPCity.dat
|
|
|
|
ln -s GeoLiteCityv6.dat GeoIPCityv6.dat
|