2021-12-18 14:02:09 +01:00
|
|
|
{ stdenv, pkgsBuildBuild, fetchFromGitHub, lib }:
|
2021-10-05 04:53:32 +02:00
|
|
|
|
|
|
|
let
|
2021-12-18 14:02:09 +01:00
|
|
|
generator = pkgsBuildBuild.buildGoModule rec {
|
2021-10-05 04:53:32 +02:00
|
|
|
pname = "v2ray-domain-list-community";
|
2023-12-08 23:20:54 +01:00
|
|
|
version = "20231208065009";
|
2021-10-05 04:53:32 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "v2fly";
|
|
|
|
repo = "domain-list-community";
|
|
|
|
rev = version;
|
2023-12-08 23:20:54 +01:00
|
|
|
hash = "sha256-Z5yUtkumr/JuKzq47QdPuHSJOSxD2XsK9sYE1hUhoyY=";
|
2021-10-05 04:53:32 +02:00
|
|
|
};
|
2023-10-30 17:15:15 +01:00
|
|
|
vendorHash = "sha256-6167kRAC5m5FlBr7uk+qKUcjWsb45P5Vvovyb6hHSVQ=";
|
2021-10-05 04:53:32 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "community managed domain list";
|
|
|
|
homepage = "https://github.com/v2fly/domain-list-community";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (generator) pname version src meta;
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
${generator}/bin/domain-list-community -datapath $src/data --exportlists=category-ads-all,tld-cn,cn,tld-\!cn,geolocation-\!cn,apple,icloud
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm644 dlc.dat $out/share/v2ray/geosite.dat
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
passthru.generator = generator;
|
|
|
|
}
|