2022-02-14 12:05:34 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, python3
|
|
|
|
, makeWrapper
|
|
|
|
, libtorrent-rasterbar-1_2_x
|
|
|
|
, qt5
|
2021-11-24 16:40:40 +00:00
|
|
|
}:
|
2011-09-02 12:11:48 +01:00
|
|
|
|
2021-11-24 16:40:40 +00:00
|
|
|
let
|
|
|
|
libtorrent = (python3.pkgs.toPythonModule (
|
|
|
|
libtorrent-rasterbar-1_2_x.override { python = python3; })).python;
|
|
|
|
in
|
2015-07-11 23:09:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tribler";
|
2022-02-17 13:55:32 +00:00
|
|
|
version = "7.11.0";
|
2011-05-03 18:12:31 +01:00
|
|
|
|
2017-09-10 11:06:01 +01:00
|
|
|
src = fetchurl {
|
2019-11-25 19:32:28 +00:00
|
|
|
url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz";
|
2022-02-17 13:55:32 +00:00
|
|
|
sha256 = "0ffh8chb47iaar8872gvalgm84fjzyxph16nixsxknnprqdxyrkx";
|
2011-05-03 18:12:31 +01:00
|
|
|
};
|
|
|
|
|
2019-11-25 19:32:28 +00:00
|
|
|
nativeBuildInputs = [
|
2021-11-24 16:40:40 +00:00
|
|
|
python3.pkgs.wrapPython
|
2015-07-11 23:09:46 +01:00
|
|
|
makeWrapper
|
2019-11-25 19:32:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-11-24 16:40:40 +00:00
|
|
|
python3.pkgs.python
|
2015-07-11 23:09:46 +01:00
|
|
|
];
|
|
|
|
|
2021-11-24 16:40:40 +00:00
|
|
|
pythonPath = [
|
|
|
|
libtorrent
|
|
|
|
] ++ (with python3.pkgs; [
|
2022-02-14 12:05:34 +00:00
|
|
|
aiohttp
|
|
|
|
aiohttp-apispec
|
|
|
|
asynctest
|
2021-01-03 08:22:27 +00:00
|
|
|
chardet
|
|
|
|
cherrypy
|
|
|
|
configobj
|
2022-02-14 12:05:34 +00:00
|
|
|
cryptography
|
2021-01-03 08:22:27 +00:00
|
|
|
decorator
|
2022-02-14 12:05:34 +00:00
|
|
|
faker
|
2021-01-03 08:22:27 +00:00
|
|
|
feedparser
|
2022-02-14 12:05:34 +00:00
|
|
|
libnacl
|
|
|
|
lz4
|
|
|
|
m2crypto
|
|
|
|
netifaces
|
2021-01-03 08:22:27 +00:00
|
|
|
networkx
|
2022-02-14 12:05:34 +00:00
|
|
|
pillow
|
2021-01-03 08:22:27 +00:00
|
|
|
pony
|
2022-02-14 12:05:34 +00:00
|
|
|
psutil
|
|
|
|
pyasn1
|
|
|
|
pycrypto
|
|
|
|
pyqt5
|
2021-01-03 08:22:27 +00:00
|
|
|
pyqtgraph
|
2021-11-24 16:40:40 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
2022-02-14 12:05:34 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
sentry-sdk
|
|
|
|
service-identity
|
|
|
|
twisted
|
2021-11-24 16:40:40 +00:00
|
|
|
yappi
|
2022-02-17 13:55:32 +00:00
|
|
|
pydantic
|
|
|
|
anyio
|
2021-11-24 16:40:40 +00:00
|
|
|
]);
|
2011-05-03 18:12:31 +01:00
|
|
|
|
2017-03-22 00:01:51 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out
|
|
|
|
# Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
|
|
|
|
wrapPythonPrograms
|
|
|
|
cp -prvd ./* $out/
|
2021-11-24 16:40:40 +00:00
|
|
|
makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \
|
2017-09-10 11:06:01 +01:00
|
|
|
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
|
2022-02-17 13:55:32 +00:00
|
|
|
--set QT_PLUGIN_PATH "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}" \
|
2022-03-14 18:06:00 +00:00
|
|
|
--set _TRIBLERPATH "$out/src" \
|
2021-11-24 16:40:40 +00:00
|
|
|
--set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \
|
2017-03-22 00:01:51 +00:00
|
|
|
--set NO_AT_BRIDGE 1 \
|
2022-03-14 18:06:00 +00:00
|
|
|
--chdir "$out/src" \
|
2021-11-24 16:40:40 +00:00
|
|
|
--add-flags "-O $out/src/run_tribler.py"
|
2020-03-16 20:37:41 +00:00
|
|
|
|
2021-11-24 16:40:40 +00:00
|
|
|
mkdir -p $out/share/applications $out/share/icons
|
2022-02-17 13:55:32 +00:00
|
|
|
cp $out/build/debian/tribler/usr/share/applications/org.tribler.Tribler.desktop $out/share/applications/
|
2021-11-24 16:40:40 +00:00
|
|
|
cp $out/build/debian/tribler/usr/share/pixmaps/tribler_big.xpm $out/share/icons/tribler.xpm
|
2017-03-22 00:01:51 +00:00
|
|
|
'';
|
2011-05-03 18:12:31 +01:00
|
|
|
|
2022-02-17 13:55:32 +00:00
|
|
|
shellHook = ''
|
|
|
|
wrapPythonPrograms || true
|
|
|
|
export QT_QPA_PLATFORM_PLUGIN_PATH=$(echo ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms)
|
|
|
|
export PYTHONPATH=./tribler-core:./tribler-common:./tribler-gui:$program_PYTHONPATH
|
|
|
|
export QT_PLUGIN_PATH="${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-02-14 12:05:34 +00:00
|
|
|
description = "Decentralised P2P filesharing client based on the Bittorrent protocol";
|
2020-03-03 19:29:13 +00:00
|
|
|
homepage = "https://www.tribler.org/";
|
2022-02-14 12:05:34 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ xvapx viric ];
|
2017-03-22 00:01:51 +00:00
|
|
|
platforms = platforms.linux;
|
2011-05-03 18:12:31 +01:00
|
|
|
};
|
|
|
|
}
|