blob: 2989d934eb78288106f287053479cd631a40976c (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
stdenv,
pkgsBuildBuild,
fetchFromGitHub,
lib,
nix-update-script,
}:
let
generator = pkgsBuildBuild.buildGoModule rec {
pname = "v2ray-domain-list-community";
version = "20250326132209";
src = fetchFromGitHub {
owner = "v2fly";
repo = "domain-list-community";
rev = version;
hash = "sha256-oxL9XgaTdMISdCQ37gAz4LtgV1bk09GirTtVbSOm8Z4=";
};
vendorHash = "sha256-NLh14rXRci4hgDkBJVJDIDvobndB7KYRKAX7UjyqSsg=";
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
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm644 dlc.dat $out/share/v2ray/geosite.dat
runHook postInstall
'';
passthru = {
inherit generator;
updateScript = nix-update-script { };
};
}
|