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
, stdenv
, fetchurl
, fetchPypi
, python3
, makeWrapper
, libtorrent-rasterbar-1_2_x
@ -12,16 +13,19 @@ let
in
stdenv.mkDerivation rec {
pname = "tribler";
version = "7.11.0";
version = "7.13.0";
src = fetchurl {
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
sha256 = "0ffh8chb47iaar8872gvalgm84fjzyxph16nixsxknnprqdxyrkx";
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-${version}.tar.xz";
hash = "sha256-j9+Kq6dOqiJCTY3vuRWGnciuwACU7L0pl73l6nkDLN4=";
};
nativeBuildInputs = [
python3.pkgs.wrapPython
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 = [
@ -31,38 +35,49 @@ stdenv.mkDerivation rec {
pythonPath = [
libtorrent
] ++ (with python3.pkgs; [
# requirements-core.txt
aiohttp
aiohttp-apispec
asynctest
anyio
chardet
cherrypy
configobj
cryptography
decorator
faker
feedparser
libnacl
lz4
m2crypto
marshmallow
netifaces
networkx
pillow
pony
psutil
pyasn1
pycrypto
pyqt5
pyqtgraph
pytest-asyncio
pytest-timeout
pydantic
pyopenssl
pyyaml
requests
sentry-sdk
service-identity
twisted
yappi
pydantic
anyio
yarl
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 = ''
@ -71,8 +86,6 @@ stdenv.mkDerivation rec {
wrapPythonPrograms
cp -prvd ./* $out/
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 PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \
--set NO_AT_BRIDGE 1 \
@ -95,7 +108,7 @@ stdenv.mkDerivation rec {
description = "Decentralised P2P filesharing client based on the Bittorrent protocol";
homepage = "https://www.tribler.org/";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ xvapx viric ];
maintainers = with maintainers; [ xvapx viric mkg20001 ];
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 { };
human-readable = callPackage ../development/python-modules/human-readable { };
humblewx = callPackage ../development/python-modules/humblewx { };
hupper = callPackage ../development/python-modules/hupper { };
@ -10462,6 +10464,8 @@ self: super: with self; {
pyipp = callPackage ../development/python-modules/pyipp { };
pyipv8 = callPackage ../development/python-modules/pyipv8 { };
pyiqvia = callPackage ../development/python-modules/pyiqvia { };
pyisbn = callPackage ../development/python-modules/pyisbn { };