Merge pull request #270350 from mkg20001/tribler

This commit is contained in:
Maciej Krüger 2023-12-08 18:10:25 +01:00 committed by GitHub
commit 92267eff49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 20 deletions

View File

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchurl , fetchurl
, fetchPypi
, python3 , python3
, makeWrapper , makeWrapper
, libtorrent-rasterbar-1_2_x , libtorrent-rasterbar-1_2_x
@ -12,16 +13,19 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "tribler"; pname = "tribler";
version = "7.11.0"; version = "7.13.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz"; url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-${version}.tar.xz";
sha256 = "0ffh8chb47iaar8872gvalgm84fjzyxph16nixsxknnprqdxyrkx"; hash = "sha256-j9+Kq6dOqiJCTY3vuRWGnciuwACU7L0pl73l6nkDLN4=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
python3.pkgs.wrapPython python3.pkgs.wrapPython
makeWrapper makeWrapper
# we had a "copy" of this in tribler's makeWrapper
# but it went out of date and broke, so please just use it directly
qt5.wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [
@ -31,38 +35,49 @@ stdenv.mkDerivation rec {
pythonPath = [ pythonPath = [
libtorrent libtorrent
] ++ (with python3.pkgs; [ ] ++ (with python3.pkgs; [
# requirements-core.txt
aiohttp aiohttp
aiohttp-apispec aiohttp-apispec
asynctest anyio
chardet chardet
cherrypy
configobj configobj
cryptography cryptography
decorator decorator
faker faker
feedparser
libnacl libnacl
lz4 lz4
m2crypto marshmallow
netifaces netifaces
networkx networkx
pillow
pony pony
psutil psutil
pyasn1 pyasn1
pycrypto pydantic
pyqt5 pyopenssl
pyqtgraph
pytest-asyncio
pytest-timeout
pyyaml pyyaml
requests
sentry-sdk sentry-sdk
service-identity service-identity
twisted
yappi yappi
pydantic yarl
anyio bitarray
(pyipv8.overrideAttrs (p: rec {
version = "2.10.0";
src = fetchPypi {
inherit (p) pname;
inherit version;
hash = "sha256-yxiXBxBiPokequm+vjsHIoG9kQnRnbsOx3mYOd8nmiU=";
};
}))
libtorrent
file-read-backwards
brotli
human-readable
# requirements.txt
pillow
pyqt5
#pyqt5-sip
pyqtgraph
pyqtwebengine
]); ]);
installPhase = '' installPhase = ''
@ -71,8 +86,6 @@ stdenv.mkDerivation rec {
wrapPythonPrograms wrapPythonPrograms
cp -prvd ./* $out/ cp -prvd ./* $out/
makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \ makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
--set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \
--set _TRIBLERPATH "$out/src" \ --set _TRIBLERPATH "$out/src" \
--set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \ --set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \
--set NO_AT_BRIDGE 1 \ --set NO_AT_BRIDGE 1 \
@ -95,7 +108,7 @@ stdenv.mkDerivation rec {
description = "Decentralised P2P filesharing client based on the Bittorrent protocol"; description = "Decentralised P2P filesharing client based on the Bittorrent protocol";
homepage = "https://www.tribler.org/"; homepage = "https://www.tribler.org/";
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
maintainers = with maintainers; [ xvapx viric ]; maintainers = with maintainers; [ xvapx viric mkg20001 ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -0,0 +1,33 @@
{ lib
, fetchPypi
, buildPythonPackage
, hatchling
, hatch-vcs
}:
buildPythonPackage rec {
pname = "human-readable";
version = "1.3.4";
src = fetchPypi {
pname = "human_readable";
inherit version;
hash = "sha256-VybqyJBm7CXRREehc+ZFqFUYRkXQJOswZwXiv7tg8MA=";
};
pyproject = true;
nativeBuildInputs = [
hatchling
hatch-vcs
];
meta = with lib; {
description = "Library to make data intended for machines, readable to humans";
homepage = "https://github.com/staticdev/human-readable";
license = licenses.mit;
maintainers = with maintainers; [
mkg20001
];
};
}

View File

@ -0,0 +1,48 @@
{ lib
, fetchPypi
, buildPythonPackage
, cryptography
, libnacl
, aiohttp
, aiohttp-apispec
, pyopenssl
, pyasn1
, marshmallow
, typing-extensions
, packaging
, apispec
}:
buildPythonPackage rec {
pname = "pyipv8";
version = "2.12.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-FXvMykUko3v0GmAZYUt5esBuTbxqpjOL4YxrRfE3u5o=";
};
propagatedBuildInputs = [
cryptography
libnacl
aiohttp
aiohttp-apispec
pyopenssl
pyasn1
marshmallow
typing-extensions
packaging
apispec
];
doCheck = false;
meta = with lib; {
description = "Python implementation of Tribler's IPv8 p2p-networking layer";
homepage = "https://github.com/Tribler/py-ipv8";
license = licenses.lgpl3Only;
maintainers = with maintainers; [
mkg20001
];
};
}

View File

@ -5245,6 +5245,8 @@ self: super: with self; {
humanize = callPackage ../development/python-modules/humanize { }; humanize = callPackage ../development/python-modules/humanize { };
human-readable = callPackage ../development/python-modules/human-readable { };
humblewx = callPackage ../development/python-modules/humblewx { }; humblewx = callPackage ../development/python-modules/humblewx { };
hupper = callPackage ../development/python-modules/hupper { }; hupper = callPackage ../development/python-modules/hupper { };
@ -10462,6 +10464,8 @@ self: super: with self; {
pyipp = callPackage ../development/python-modules/pyipp { }; pyipp = callPackage ../development/python-modules/pyipp { };
pyipv8 = callPackage ../development/python-modules/pyipv8 { };
pyiqvia = callPackage ../development/python-modules/pyiqvia { }; pyiqvia = callPackage ../development/python-modules/pyiqvia { };
pyisbn = callPackage ../development/python-modules/pyisbn { }; pyisbn = callPackage ../development/python-modules/pyisbn { };