aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/networking/qv2ray/default.nix
blob: f4d41ee79e6df8c7087a6d906db321b03a19ddcf (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ stdenv
, mkDerivation
, fetchFromGitHub
, qmake
, qttools
, cmake
, clang
, grpc
, protobuf
, openssl
, pkgconfig
, c-ares
, abseil-cpp
, libGL
, zlib
}:

mkDerivation rec {
  pname = "qv2ray";
  version = "2.6.3";

  src = fetchFromGitHub {
    owner = "Qv2ray";
    repo = "Qv2ray";
    rev = "v${version}";
    sha256 = "sha256-zf3IlpRbZGDZMEny0jp7S+kWtcE1Z10U9GzKC0W0mZI=";
    fetchSubmodules = true;
  };

  cmakeFlags = [
    "-DCMAKE_BUILD_TYPE=Release"
    "-DQV2RAY_DISABLE_AUTO_UPDATE=on"
    "-DQV2RAY_TRANSLATION_PATH=${placeholder "out"}/share/qv2ray/lang"
  ];

  preConfigure = ''
    export _QV2RAY_BUILD_INFO_="Qv2ray Nixpkgs"
    export _QV2RAY_BUILD_EXTRA_INFO_="(Nixpkgs build) nixpkgs"
  '';

  buildInputs = [
    libGL
    zlib
    grpc
    protobuf
    openssl
    abseil-cpp
    c-ares
  ];

  nativeBuildInputs = [
    cmake
    clang
    pkgconfig
    qmake
    qttools
  ];

  meta = with stdenv.lib; {
    description = "An GUI frontend to v2ray";
    homepage = "https://qv2ray.github.io/en/";
    license = licenses.gpl3;
    maintainers = with maintainers; [ poscat ];
    platforms = platforms.all;
  };
}