Merge pull request #128145 from viric/tribler-master2
This commit is contained in:
commit
4b3b13c9c7
@ -1,26 +1,35 @@
|
|||||||
{ stdenv, fetchurl, python3Packages, makeWrapper
|
{ stdenv, lib, fetchurl, python3, makeWrapper
|
||||||
, enablePlayer ? true, libvlc, qt5, lib }:
|
, libtorrent-rasterbar-1_2_x, qt5
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
libtorrent = (python3.pkgs.toPythonModule (
|
||||||
|
libtorrent-rasterbar-1_2_x.override { python = python3; })).python;
|
||||||
|
|
||||||
|
aiohttp-apispec = python3.pkgs.callPackage
|
||||||
|
../../../../development/python-modules/aiohttp-apispec/unstable.nix { };
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tribler";
|
pname = "tribler";
|
||||||
version = "7.4.4";
|
version = "7.10.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-v${version}.tar.xz";
|
||||||
sha256 = "0hxiyf1k07ngym2p8r1b5mcx1y2crkyz43gi9sgvsvsyijyaff3p";
|
sha256 = "1x45z23d1cqf0lai7wg5ki7gi2vba5hqk0swhggzplcjwma4wmh9";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3Packages.wrapPython
|
python3.pkgs.wrapPython
|
||||||
makeWrapper
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python3Packages.python
|
python3.pkgs.python
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = with python3Packages; [
|
pythonPath = [
|
||||||
libtorrent-rasterbar
|
libtorrent
|
||||||
|
] ++ (with python3.pkgs; [
|
||||||
twisted
|
twisted
|
||||||
netifaces
|
netifaces
|
||||||
pycrypto
|
pycrypto
|
||||||
@ -42,49 +51,44 @@ stdenv.mkDerivation rec {
|
|||||||
pony
|
pony
|
||||||
lz4
|
lz4
|
||||||
pyqtgraph
|
pyqtgraph
|
||||||
|
pyyaml
|
||||||
|
aiohttp
|
||||||
|
aiohttp-apispec
|
||||||
|
faker
|
||||||
|
sentry-sdk
|
||||||
|
pytest-asyncio
|
||||||
|
pytest-timeout
|
||||||
|
asynctest
|
||||||
|
yappi
|
||||||
|
|
||||||
# there is a BTC feature, but it requires some unclear version of
|
# there is a BTC feature, but it requires some unclear version of
|
||||||
# bitcoinlib, so this doesn't work right now.
|
# bitcoinlib, so this doesn't work right now.
|
||||||
# bitcoinlib
|
# bitcoinlib
|
||||||
];
|
]);
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
${lib.optionalString enablePlayer ''
|
|
||||||
substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${libvlc}/lib/libvlc.so')"
|
|
||||||
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" \
|
|
||||||
--replace "if vlc and vlc.plugin_path" "if vlc" \
|
|
||||||
--replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${libvlc}/lib/vlc/plugins'"
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -pv $out
|
mkdir -pv $out
|
||||||
# Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
|
# Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH.
|
||||||
wrapPythonPrograms
|
wrapPythonPrograms
|
||||||
cp -prvd ./* $out/
|
cp -prvd ./* $out/
|
||||||
makeWrapper ${python3Packages.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_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
|
||||||
--set _TRIBLERPATH $out \
|
--set _TRIBLERPATH $out/src \
|
||||||
--set PYTHONPATH $out:$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 \
|
||||||
--run 'cd $_TRIBLERPATH' \
|
--run 'cd $_TRIBLERPATH' \
|
||||||
--add-flags "-O $out/run_tribler.py" \
|
--add-flags "-O $out/src/run_tribler.py"
|
||||||
${lib.optionalString enablePlayer ''
|
|
||||||
--prefix LD_LIBRARY_PATH : ${libvlc}/lib
|
|
||||||
''}
|
|
||||||
|
|
||||||
mkdir -p $out/share/applications $out/share/icons $out/share/man/man1
|
mkdir -p $out/share/applications $out/share/icons
|
||||||
cp $out/Tribler/Main/Build/Ubuntu/tribler.desktop $out/share/applications/tribler.desktop
|
cp $out/build/debian/tribler/usr/share/applications/tribler.desktop $out/share/applications/tribler.desktop
|
||||||
cp $out/Tribler/Main/Build/Ubuntu/tribler_big.xpm $out/share/icons/tribler.xpm
|
cp $out/build/debian/tribler/usr/share/pixmaps/tribler_big.xpm $out/share/icons/tribler.xpm
|
||||||
cp $out/Tribler/Main/Build/Ubuntu/tribler.1 $out/share/man/man1/tribler.1
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
maintainers = with maintainers; [ xvapx ];
|
maintainers = with maintainers; [ xvapx viric ];
|
||||||
homepage = "https://www.tribler.org/";
|
homepage = "https://www.tribler.org/";
|
||||||
description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
|
description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol";
|
||||||
license = licenses.lgpl21;
|
license = licenses.lgpl21;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
broken = true; # 2021-03-17 see https://github.com/NixOS/nixpkgs/issues/93053
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
37
pkgs/development/python-modules/aiohttp-apispec/unstable.nix
Normal file
37
pkgs/development/python-modules/aiohttp-apispec/unstable.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder
|
||||||
|
, aiohttp, webargs, fetchFromGitHub, callPackage
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
apispec3 = callPackage ../apispec/3.nix {};
|
||||||
|
jinja2 = callPackage ../jinja2/2.nix {};
|
||||||
|
in
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "aiohttp-apispec";
|
||||||
|
version = "unstable-2021-21-08";
|
||||||
|
|
||||||
|
# unstable so we can use latest webargs
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "maximdanilchenko";
|
||||||
|
repo = "aiohttp-apispec";
|
||||||
|
rev = "cfa19646394480dda289f6b7af19b7d50f245d81";
|
||||||
|
sha256 = "uEgDRAlMjTa4rvdE3fkORCHIlCLzxPJJ2/m4ZRU3eIQ=";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ aiohttp webargs apispec3 jinja2 ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"aiohttp_apispec"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Requires pytest-sanic, currently broken in nixpkgs
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Build and document REST APIs with aiohttp and apispec";
|
||||||
|
homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.viric ];
|
||||||
|
};
|
||||||
|
}
|
47
pkgs/development/python-modules/apispec/3.nix
Normal file
47
pkgs/development/python-modules/apispec/3.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pyyaml
|
||||||
|
, prance
|
||||||
|
, marshmallow
|
||||||
|
, pytestCheckHook
|
||||||
|
, mock
|
||||||
|
, openapi-spec-validator
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "apispec";
|
||||||
|
version = "3.3.2";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "d23ebd5b71e541e031b02a19db10b5e6d5ef8452c552833e3e1afc836b40b1ad";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pyyaml
|
||||||
|
prance
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
rm tests/test_ext_marshmallow.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
openapi-spec-validator
|
||||||
|
marshmallow
|
||||||
|
mock
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"apispec"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification";
|
||||||
|
homepage = "https://github.com/marshmallow-code/apispec";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.viric ];
|
||||||
|
};
|
||||||
|
}
|
@ -24,7 +24,7 @@ buildPythonPackage rec {
|
|||||||
doCheck = !stdenv.is32bit || isPy3k;
|
doCheck = !stdenv.is32bit || isPy3k;
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest -v tests
|
pytest -v tests -W ignore::ResourceWarning -W ignore::DeprecationWarning
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -16,8 +16,8 @@ buildPythonPackage rec {
|
|||||||
"webargs"
|
"webargs"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ marshmallow ];
|
propagatedBuildInputs = [ marshmallow ];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
pytest-aiohttp
|
pytest-aiohttp
|
||||||
|
@ -9934,6 +9934,8 @@ in {
|
|||||||
|
|
||||||
weasyprint = callPackage ../development/python-modules/weasyprint { };
|
weasyprint = callPackage ../development/python-modules/weasyprint { };
|
||||||
|
|
||||||
|
webargs = callPackage ../development/python-modules/webargs { };
|
||||||
|
|
||||||
webapp2 = callPackage ../development/python-modules/webapp2 { };
|
webapp2 = callPackage ../development/python-modules/webapp2 { };
|
||||||
|
|
||||||
webassets = callPackage ../development/python-modules/webassets { };
|
webassets = callPackage ../development/python-modules/webassets { };
|
||||||
@ -9952,8 +9954,6 @@ in {
|
|||||||
|
|
||||||
webhelpers = callPackage ../development/python-modules/webhelpers { };
|
webhelpers = callPackage ../development/python-modules/webhelpers { };
|
||||||
|
|
||||||
webargs = callPackage ../development/python-modules/webargs { };
|
|
||||||
|
|
||||||
webob = callPackage ../development/python-modules/webob { };
|
webob = callPackage ../development/python-modules/webob { };
|
||||||
|
|
||||||
weboob = callPackage ../development/python-modules/weboob { };
|
weboob = callPackage ../development/python-modules/weboob { };
|
||||||
|
Loading…
Reference in New Issue
Block a user