Merge pull request #147010 from NickCao/v2ray-geoip

v2ray-geoip: init at 202111250029
This commit is contained in:
Bobby Rong 2021-12-14 15:56:51 +08:00 committed by GitHub
commit f6e6287d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 0 deletions

View 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 ];
};
}

View 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)"

View File

@ -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 {};