tor: split out geoip data

Saves about 5.2 MiB.

To use geoip, add something like
```
GeoIPFile ${tor.geoip}/share/tor/geoip
GeoIPv6File ${tor.geoip}/share/tor/geoip6
```
to torrc
This commit is contained in:
Joachim Fasting 2017-03-02 03:09:27 +01:00
parent c5367a4409
commit c44a41c73f
No known key found for this signature in database
GPG Key ID: 7544761007FE4E08

View File

@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "0h8kpn42mgpkzmnga143hi8nh0ai65ypxh7qhkwbb15j3wz2h4fn";
};
outputs = [ "out" "geoip" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libevent openssl zlib ] ++
stdenv.lib.optionals stdenv.isLinux [ libseccomp systemd libcap ];
@ -22,6 +24,12 @@ stdenv.mkDerivation rec {
--replace 'exec torsocks' 'exec ${torsocks}/bin/torsocks'
'';
postInstall = ''
mkdir -p $geoip/share/tor
mv $out/share/tor/geoip{,6} $geoip/share/tor
rm -rf $out/share/tor
'';
doCheck = true;
meta = with stdenv.lib; {