Merge pull request #244129 from 1sixth/dae
dae: add support for geolocation databases
This commit is contained in:
commit
1899ff0ca0
1 changed files with 18 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
||||||
{ lib
|
{ lib
|
||||||
, clang
|
, clang
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, symlinkJoin
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
|
, makeWrapper
|
||||||
|
, v2ray-geoip
|
||||||
|
, v2ray-domain-list-community
|
||||||
}:
|
}:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "dae";
|
pname = "dae";
|
||||||
|
@ -19,7 +23,7 @@ buildGoModule rec {
|
||||||
|
|
||||||
proxyVendor = true;
|
proxyVendor = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ clang ];
|
nativeBuildInputs = [ clang makeWrapper ];
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s"
|
"-s"
|
||||||
|
@ -37,6 +41,19 @@ buildGoModule rec {
|
||||||
# network required
|
# network required
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
assetsDrv = symlinkJoin {
|
||||||
|
name = "dae-assets";
|
||||||
|
paths = [ v2ray-geoip v2ray-domain-list-community ];
|
||||||
|
};
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
install -Dm444 install/dae.service $out/lib/systemd/system/dae.service
|
||||||
|
wrapProgram $out/bin/dae \
|
||||||
|
--suffix DAE_LOCATION_ASSET : $assetsDrv/share/v2ray
|
||||||
|
substituteInPlace $out/lib/systemd/system/dae.service \
|
||||||
|
--replace /usr/bin/dae $out/bin/dae
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Linux high-performance transparent proxy solution based on eBPF";
|
description = "A Linux high-performance transparent proxy solution based on eBPF";
|
||||||
homepage = "https://github.com/daeuniverse/dae";
|
homepage = "https://github.com/daeuniverse/dae";
|
||||||
|
|
Loading…
Reference in a new issue