2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-09-01 23:48:41 +00:00
|
|
|
, stdenv
|
2020-11-23 09:50:03 +00:00
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
2022-10-09 14:56:38 +00:00
|
|
|
, symlinkJoin
|
2020-11-23 09:50:03 +00:00
|
|
|
, qttools
|
|
|
|
, cmake
|
|
|
|
, grpc
|
2024-10-16 09:23:52 +00:00
|
|
|
, protobuf_21
|
2020-11-23 09:50:03 +00:00
|
|
|
, openssl
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config
|
2020-11-23 09:50:03 +00:00
|
|
|
, c-ares
|
|
|
|
, libGL
|
|
|
|
, zlib
|
2021-09-01 23:48:41 +00:00
|
|
|
, curl
|
2022-10-09 14:56:38 +00:00
|
|
|
, v2ray
|
|
|
|
, v2ray-geoip, v2ray-domain-list-community
|
|
|
|
, assets ? [ v2ray-geoip v2ray-domain-list-community ]
|
2020-11-23 09:50:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "qv2ray";
|
qv2ray: unstable-2023-06-09 -> unstable-2023-07-11
https://github.com/Qv2ray/Qv2ray/commit/b3080564809dd8aef864a54ca1b79f0984fe986b
Fixes:
/build/source/src/base/Qv2rayLog.hpp:17:29: error: expected primary-expression before ',' token
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
/build/source/src/base/Qv2rayLog.hpp:17:63: error: expected primary-expression before ')' token
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
/build/source/src/base/Qv2rayLog.hpp:17:64: error: template argument 2 is invalid
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
2023-10-26 13:32:05 +00:00
|
|
|
version = "unstable-2023-07-11";
|
2020-11-23 09:50:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Qv2ray";
|
|
|
|
repo = "Qv2ray";
|
qv2ray: unstable-2023-06-09 -> unstable-2023-07-11
https://github.com/Qv2ray/Qv2ray/commit/b3080564809dd8aef864a54ca1b79f0984fe986b
Fixes:
/build/source/src/base/Qv2rayLog.hpp:17:29: error: expected primary-expression before ',' token
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
/build/source/src/base/Qv2rayLog.hpp:17:63: error: expected primary-expression before ')' token
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
/build/source/src/base/Qv2rayLog.hpp:17:64: error: template argument 2 is invalid
17 | #define ___LOG_EXPAND(___x) , QPair<std::string, decltype(___x)>(std::string(#___x), [&] { return ___x; }())
| ^
2023-10-26 13:32:05 +00:00
|
|
|
rev = "b3080564809dd8aef864a54ca1b79f0984fe986b";
|
|
|
|
hash = "sha256-LwBjuX5x3kQcdEfPLEirWpkMqOigkhNoh/VNmBfPAzw=";
|
2020-11-23 09:50:03 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-10-09 14:56:38 +00:00
|
|
|
postPatch = lib.optionals stdenv.hostPlatform.isDarwin ''
|
2021-09-01 23:48:41 +00:00
|
|
|
substituteInPlace cmake/platforms/macos.cmake \
|
|
|
|
--replace \''${QV2RAY_QtX_DIR}/../../../bin/macdeployqt macdeployqt
|
|
|
|
'';
|
|
|
|
|
2022-10-09 14:56:38 +00:00
|
|
|
assetsDrv = symlinkJoin {
|
|
|
|
name = "v2ray-assets";
|
|
|
|
paths = assets;
|
|
|
|
};
|
|
|
|
|
2020-11-23 09:50:03 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DQV2RAY_DISABLE_AUTO_UPDATE=on"
|
2022-10-09 14:56:38 +00:00
|
|
|
"-DQV2RAY_USE_V5_CORE=on"
|
2020-11-23 09:50:03 +00:00
|
|
|
"-DQV2RAY_TRANSLATION_PATH=${placeholder "out"}/share/qv2ray/lang"
|
2022-10-09 14:56:38 +00:00
|
|
|
"-DQV2RAY_DEFAULT_VASSETS_PATH='${assetsDrv}/share/v2ray'"
|
|
|
|
"-DQV2RAY_DEFAULT_VCORE_PATH='${v2ray}/bin/v2ray'"
|
2020-11-23 09:50:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export _QV2RAY_BUILD_INFO_="Qv2ray Nixpkgs"
|
|
|
|
export _QV2RAY_BUILD_EXTRA_INFO_="(Nixpkgs build) nixpkgs"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libGL
|
|
|
|
zlib
|
|
|
|
grpc
|
2024-10-16 09:23:52 +00:00
|
|
|
protobuf_21
|
2020-11-23 09:50:03 +00:00
|
|
|
openssl
|
|
|
|
c-ares
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-01-17 02:09:27 +00:00
|
|
|
pkg-config
|
2020-11-23 09:50:03 +00:00
|
|
|
qttools
|
2021-09-01 23:48:41 +00:00
|
|
|
curl
|
2024-01-24 16:40:28 +00:00
|
|
|
];
|
2020-11-23 09:50:03 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-23 09:50:03 +00:00
|
|
|
description = "GUI frontend to v2ray";
|
2023-01-28 05:41:14 +00:00
|
|
|
homepage = "https://github.com/Qv2ray/Qv2ray";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-10-09 14:56:38 +00:00
|
|
|
maintainers = with maintainers; [ poscat rewine ];
|
2020-11-23 09:50:03 +00:00
|
|
|
platforms = platforms.all;
|
2023-01-28 05:41:14 +00:00
|
|
|
# never built on aarch64-darwin, x86_64-darwin since update to unstable-2022-09-25
|
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "qv2ray";
|
2020-11-23 09:50:03 +00:00
|
|
|
};
|
|
|
|
}
|