Merge pull request #147010 from NickCao/v2ray-geoip
v2ray-geoip: init at 202111250029
This commit is contained in:
commit
f6e6287d0b
3 changed files with 36 additions and 0 deletions
28
pkgs/data/misc/v2ray-geoip/default.nix
Normal file
28
pkgs/data/misc/v2ray-geoip/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "v2ray-geoip";
|
||||
version = "202112090029";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "v2fly";
|
||||
repo = "geoip";
|
||||
rev = "97f4acb31d926ae31bb3cdc5c8948d8dcdddca79";
|
||||
sha256 = "sha256-kYMp/D7xVpBTu35YXq45bR2XebpVOW57UAc7H/6px/U=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -m 0644 geoip.dat -D $out/share/v2ray/geoip.dat
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "GeoIP for V2Ray";
|
||||
homepage = "https://github.com/v2fly/geoip";
|
||||
license = licenses.cc-by-sa-40;
|
||||
maintainers = with maintainers; [ nickcao ];
|
||||
};
|
||||
}
|
6
pkgs/data/misc/v2ray-geoip/update.sh
Executable file
6
pkgs/data/misc/v2ray-geoip/update.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p common-updater-scripts curl jq
|
||||
set -euo pipefail
|
||||
|
||||
COMMIT=$(curl "https://api.github.com/repos/v2fly/geoip/commits/release?per_page=1")
|
||||
update-source-version v2ray-geoip "$(echo $COMMIT | jq -r .commit.message)" --file=pkgs/data/misc/v2ray-geoip/default.nix --rev="$(echo $COMMIT | jq -r .sha)"
|
|
@ -10454,6 +10454,8 @@ with pkgs;
|
|||
|
||||
v2ray-domain-list-community = callPackage ../data/misc/v2ray-domain-list-community { };
|
||||
|
||||
v2ray-geoip = callPackage ../data/misc/v2ray-geoip { };
|
||||
|
||||
vacuum = callPackage ../applications/networking/instant-messengers/vacuum {};
|
||||
|
||||
vampire = callPackage ../applications/science/logic/vampire {};
|
||||
|
|
Loading…
Reference in a new issue