3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/p2p/tribler/default.nix

61 lines
1.7 KiB
Nix
Raw Normal View History

2015-07-11 23:09:46 +01:00
{ stdenv, fetchurl, pythonPackages, makeWrapper, nettools, libtorrentRasterbar
, enablePlayer ? false, vlc ? null }:
2015-07-11 23:09:46 +01:00
stdenv.mkDerivation rec {
name = "tribler-${version}";
version = "v6.4.3";
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";
};
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
];
installPhase =
''
# Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
wrapPythonPrograms
2015-07-11 23:09:46 +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' \
--add-flags "-O $out/share/tribler/Tribler/Main/tribler.py" \
${stdenv.lib.optionalString enablePlayer ''
--prefix LD_LIBRARY_PATH : ${vlc}/lib
''}
'';
meta = {
homepage = http://www.tribler.org/;
description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
license = stdenv.lib.licenses.lgpl21;
};
}