geolite-legacy: 20230901 → 20240720
This commit is contained in:
parent
71408df70f
commit
43b40f3ba2
@ -1,34 +1,35 @@
|
|||||||
{ lib, stdenv, fetchurl, zstd }:
|
{ lib, stdenv, fetchzip, zstd }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "geolite-legacy";
|
pname = "geolite-legacy";
|
||||||
version = "20230901";
|
version = "20240720";
|
||||||
|
|
||||||
# We use Arch Linux package as a snapshot, because upstream database is updated in-place.
|
# We use Arch Linux package as a snapshot, because upstream database is updated in-place.
|
||||||
geoip = fetchurl {
|
geoip = fetchzip {
|
||||||
url = "https://archive.archlinux.org/packages/g/geoip-database/geoip-database-${version}-1-any.pkg.tar.zst";
|
url = "https://archive.archlinux.org/packages/g/geoip-database/geoip-database-${version}-1-any.pkg.tar.zst";
|
||||||
sha256 = "sha256-H6tv0OEf04TvbhbWsm5vwq+lBj4GSyOezd258VOT8yQ=";
|
hash = "sha256-9rPp1Lu6Q4+Cb4N4e/ezHacpLuUwbGQefEPuSrH8O6o=";
|
||||||
|
nativeBuildInputs = [ zstd ];
|
||||||
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extra = fetchurl {
|
extra = fetchzip {
|
||||||
url = "https://archive.archlinux.org/packages/g/geoip-database-extra/geoip-database-extra-${version}-1-any.pkg.tar.zst";
|
url = "https://archive.archlinux.org/packages/g/geoip-database-extra/geoip-database-extra-${version}-1-any.pkg.tar.zst";
|
||||||
sha256 = "sha256-Zb5m5TLJ1vcPKypZ3NliaL9oluz97ukTVGlOehuzyPU=";
|
hash = "sha256-sb06yszstKalc+b9rSuStRuY3YRebAL1Q4jEJkbGiMI=";
|
||||||
|
nativeBuildInputs = [ zstd ];
|
||||||
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ zstd ];
|
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
tar -xaf ${geoip}
|
mkdir -p $out/share/GeoIP
|
||||||
tar -xaf ${extra}
|
cp ${geoip}/usr/share/GeoIP/*.dat $out/share/GeoIP
|
||||||
mkdir -p $out/share
|
cp ${extra}/usr/share/GeoIP/*.dat $out/share/GeoIP
|
||||||
mv usr/share/GeoIP $out/share
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "GeoLite Legacy IP geolocation databases";
|
description = "GeoLite Legacy IP geolocation databases";
|
||||||
homepage = "https://mailfud.org/geoip-legacy/";
|
homepage = "https://mailfud.org/geoip-legacy/";
|
||||||
license = licenses.cc-by-sa-40;
|
license = lib.licenses.cc-by-sa-40;
|
||||||
platforms = platforms.all;
|
platforms = lib.platforms.all;
|
||||||
maintainers = with maintainers; [ fpletz ];
|
maintainers = with lib.maintainers; [ fpletz ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user