2015-07-11 23:09:46 +01:00
|
|
|
{ stdenv, fetchurl, pythonPackages, makeWrapper, nettools, libtorrentRasterbar
|
2012-02-15 16:24:02 +00:00
|
|
|
, enablePlayer ? false, vlc ? null }:
|
2011-05-03 18:12:31 +01:00
|
|
|
|
2011-09-02 12:11:48 +01:00
|
|
|
|
2015-07-11 23:09:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tribler-${version}";
|
|
|
|
version = "v6.4.3";
|
2011-05-03 18:12:31 +01:00
|
|
|
|
2015-07-11 23:09:46 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Tribler/tribler/releases/download/${version}/Tribler-${version}.tar.xz";
|
|
|
|
sha256 = "1n5qi3jlby41w60zg6dvl933ypyiflq3rb0qkwhxi4b26s3vwvgr";
|
2011-05-03 18:12:31 +01:00
|
|
|
};
|
|
|
|
|
2015-07-11 23:09:46 +01:00
|
|
|
buildInputs = [
|
|
|
|
pythonPackages.python
|
|
|
|
pythonPackages.wrapPython
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
libtorrentRasterbar
|
|
|
|
pythonPackages.wxPython
|
|
|
|
pythonPackages.curses
|
|
|
|
pythonPackages.apsw
|
|
|
|
pythonPackages.twisted
|
|
|
|
pythonPackages.gmpy
|
|
|
|
pythonPackages.netifaces
|
|
|
|
pythonPackages.pil
|
|
|
|
pythonPackages.pycrypto
|
|
|
|
pythonPackages.pyasn1
|
|
|
|
pythonPackages.requests
|
|
|
|
pythonPackages.setuptools
|
|
|
|
pythonPackages.m2crypto
|
|
|
|
pythonPackages.sqlite3
|
|
|
|
];
|
2011-05-03 18:12:31 +01:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
# Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
|
|
|
|
wrapPythonPrograms
|
2015-07-11 23:09:46 +01:00
|
|
|
|
2011-05-03 18:12:31 +01:00
|
|
|
mkdir -p $out/share/tribler
|
|
|
|
cp -prvd Tribler $out/share/tribler/
|
|
|
|
|
|
|
|
makeWrapper ${pythonPackages.python}/bin/python $out/bin/tribler \
|
|
|
|
--set _TRIBLERPATH $out/share/tribler \
|
|
|
|
--set PYTHONPATH $out/share/tribler:$program_PYTHONPATH \
|
|
|
|
--run 'cd $_TRIBLERPATH' \
|
2012-02-15 16:24:02 +00:00
|
|
|
--add-flags "-O $out/share/tribler/Tribler/Main/tribler.py" \
|
|
|
|
${stdenv.lib.optionalString enablePlayer ''
|
|
|
|
--prefix LD_LIBRARY_PATH : ${vlc}/lib
|
|
|
|
''}
|
2011-05-03 18:12:31 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.tribler.org/;
|
|
|
|
description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2011-05-03 18:12:31 +01:00
|
|
|
};
|
|
|
|
}
|