about summary refs log tree commit diff
path: root/pkgs/tools/networking/v2ray/default.nix
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-12-03 04:42:50 -0500
committerGitHub <noreply@github.com>2019-12-03 04:42:50 -0500
commit93ff0446ca70ef2795b8cc5e804feaf01e709142 (patch)
tree5e514dbe4d957377c06d607d7c25939261bf0bfa /pkgs/tools/networking/v2ray/default.nix
parenta72d15df15c190defc2c314216d8b501eaecf081 (diff)
parent899d38170cfedc567da0b11d346a9f47f65e0a86 (diff)
downloadnixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar.gz
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar.bz2
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar.lz
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar.xz
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.tar.zst
nixlib-93ff0446ca70ef2795b8cc5e804feaf01e709142.zip
Merge pull request #66089 from servalcatty/v2ray
v2ray: init at 4.21.3
Diffstat (limited to 'pkgs/tools/networking/v2ray/default.nix')
-rw-r--r--pkgs/tools/networking/v2ray/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/networking/v2ray/default.nix b/pkgs/tools/networking/v2ray/default.nix
new file mode 100644
index 000000000000..78f17934a782
--- /dev/null
+++ b/pkgs/tools/networking/v2ray/default.nix
@@ -0,0 +1,36 @@
+{ callPackage, fetchFromGitHub, fetchurl
+, assetOverrides ? {}
+, ... } @ args:
+
+callPackage ./generic.nix (rec {
+  version = "4.21.3";
+
+  src = fetchFromGitHub {
+    owner = "v2ray";
+    repo = "v2ray-core";
+    rev = "v${version}";
+    sha256 = "0z45nrjnalrvpprq7g4zrjbrdkc3d3lhs4ci8hb8m69f92asiwbs";
+  };
+
+  assets = {
+    # MIT licensed
+    "geoip.dat" = let
+      geoipRev = "20190516.1";
+      geoipSha256 = "14h4rq7rlcl1397pwpylfgwpk3fiscpzqb04c4wd5lxkfvk5f02r";
+    in fetchurl {
+      url = "https://github.com/v2ray/geoip/releases/download/${geoipRev}/geoip.dat";
+      sha256 = geoipSha256;
+    };
+
+    # MIT licensed
+    "geosite.dat" = let
+      geositeRev = "20191121.1";
+      geositeSha256 = "0ijmvy43pvm69w38djf114j8swni7wfq5ry9wdpv9dj0rzb59m74";
+    in fetchurl {
+      url = "https://github.com/v2ray/domain-list-community/releases/download/${geositeRev}/dlc.dat";
+      sha256 = geositeSha256;
+    };
+
+  } // assetOverrides;
+
+} // args)