mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
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:
parent
c5367a4409
commit
c44a41c73f
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user