4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
67 lines
1.1 KiB
Nix
67 lines
1.1 KiB
Nix
{ lib, 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 lib; {
|
|
description = "An GUI frontend to v2ray";
|
|
homepage = "https://qv2ray.github.io/en/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ poscat ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|