lol

Merge pull request #128145 from viric/tribler-master2

authored by

Sandro and committed by
GitHub
4b3b13c9 4b1cc25a

+123 -35
+35 -31
pkgs/applications/networking/p2p/tribler/default.nix
··· 1 - { stdenv, fetchurl, python3Packages, makeWrapper 2 - , enablePlayer ? true, libvlc, qt5, lib }: 1 + { stdenv, lib, fetchurl, python3, makeWrapper 2 + , libtorrent-rasterbar-1_2_x, qt5 3 + }: 4 + 5 + let 6 + libtorrent = (python3.pkgs.toPythonModule ( 7 + libtorrent-rasterbar-1_2_x.override { python = python3; })).python; 3 8 9 + aiohttp-apispec = python3.pkgs.callPackage 10 + ../../../../development/python-modules/aiohttp-apispec/unstable.nix { }; 11 + in 4 12 stdenv.mkDerivation rec { 5 13 pname = "tribler"; 6 - version = "7.4.4"; 14 + version = "7.10.0"; 7 15 8 16 src = fetchurl { 9 17 url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.xz"; 10 - sha256 = "0hxiyf1k07ngym2p8r1b5mcx1y2crkyz43gi9sgvsvsyijyaff3p"; 18 + sha256 = "1x45z23d1cqf0lai7wg5ki7gi2vba5hqk0swhggzplcjwma4wmh9"; 11 19 }; 12 20 13 21 nativeBuildInputs = [ 14 - python3Packages.wrapPython 22 + python3.pkgs.wrapPython 15 23 makeWrapper 16 24 ]; 17 25 18 26 buildInputs = [ 19 - python3Packages.python 27 + python3.pkgs.python 20 28 ]; 21 29 22 - pythonPath = with python3Packages; [ 23 - libtorrent-rasterbar 30 + pythonPath = [ 31 + libtorrent 32 + ] ++ (with python3.pkgs; [ 24 33 twisted 25 34 netifaces 26 35 pycrypto ··· 42 51 pony 43 52 lz4 44 53 pyqtgraph 54 + pyyaml 55 + aiohttp 56 + aiohttp-apispec 57 + faker 58 + sentry-sdk 59 + pytest-asyncio 60 + pytest-timeout 61 + asynctest 62 + yappi 45 63 46 64 # there is a BTC feature, but it requires some unclear version of 47 65 # bitcoinlib, so this doesn't work right now. 48 66 # bitcoinlib 49 - ]; 50 - 51 - postPatch = '' 52 - ${lib.optionalString enablePlayer '' 53 - substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${libvlc}/lib/libvlc.so')" 54 - substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" \ 55 - --replace "if vlc and vlc.plugin_path" "if vlc" \ 56 - --replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${libvlc}/lib/vlc/plugins'" 57 - ''} 58 - ''; 67 + ]); 59 68 60 69 installPhase = '' 61 70 mkdir -pv $out 62 71 # Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH. 63 72 wrapPythonPrograms 64 73 cp -prvd ./* $out/ 65 - makeWrapper ${python3Packages.python}/bin/python $out/bin/tribler \ 74 + makeWrapper ${python3.pkgs.python}/bin/python $out/bin/tribler \ 66 75 --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \ 67 - --set _TRIBLERPATH $out \ 68 - --set PYTHONPATH $out:$program_PYTHONPATH \ 76 + --set _TRIBLERPATH $out/src \ 77 + --set PYTHONPATH $out/src/tribler-core:$out/src/tribler-common:$out/src/tribler-gui:$program_PYTHONPATH \ 69 78 --set NO_AT_BRIDGE 1 \ 70 79 --run 'cd $_TRIBLERPATH' \ 71 - --add-flags "-O $out/run_tribler.py" \ 72 - ${lib.optionalString enablePlayer '' 73 - --prefix LD_LIBRARY_PATH : ${libvlc}/lib 74 - ''} 80 + --add-flags "-O $out/src/run_tribler.py" 75 81 76 - mkdir -p $out/share/applications $out/share/icons $out/share/man/man1 77 - cp $out/Tribler/Main/Build/Ubuntu/tribler.desktop $out/share/applications/tribler.desktop 78 - cp $out/Tribler/Main/Build/Ubuntu/tribler_big.xpm $out/share/icons/tribler.xpm 79 - cp $out/Tribler/Main/Build/Ubuntu/tribler.1 $out/share/man/man1/tribler.1 82 + mkdir -p $out/share/applications $out/share/icons 83 + cp $out/build/debian/tribler/usr/share/applications/tribler.desktop $out/share/applications/tribler.desktop 84 + cp $out/build/debian/tribler/usr/share/pixmaps/tribler_big.xpm $out/share/icons/tribler.xpm 80 85 ''; 81 86 82 87 meta = with lib; { 83 - maintainers = with maintainers; [ xvapx ]; 88 + maintainers = with maintainers; [ xvapx viric ]; 84 89 homepage = "https://www.tribler.org/"; 85 90 description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol"; 86 91 license = licenses.lgpl21; 87 92 platforms = platforms.linux; 88 - broken = true; # 2021-03-17 see https://github.com/NixOS/nixpkgs/issues/93053 89 93 }; 90 94 }
+37
pkgs/development/python-modules/aiohttp-apispec/unstable.nix
··· 1 + { lib, buildPythonPackage, fetchPypi, pythonOlder 2 + , aiohttp, webargs, fetchFromGitHub, callPackage 3 + }: 4 + 5 + let 6 + apispec3 = callPackage ../apispec/3.nix {}; 7 + jinja2 = callPackage ../jinja2/2.nix {}; 8 + in 9 + buildPythonPackage rec { 10 + pname = "aiohttp-apispec"; 11 + version = "unstable-2021-21-08"; 12 + 13 + # unstable so we can use latest webargs 14 + src = fetchFromGitHub { 15 + owner = "maximdanilchenko"; 16 + repo = "aiohttp-apispec"; 17 + rev = "cfa19646394480dda289f6b7af19b7d50f245d81"; 18 + sha256 = "uEgDRAlMjTa4rvdE3fkORCHIlCLzxPJJ2/m4ZRU3eIQ="; 19 + fetchSubmodules = false; 20 + }; 21 + 22 + propagatedBuildInputs = [ aiohttp webargs apispec3 jinja2 ]; 23 + 24 + pythonImportsCheck = [ 25 + "aiohttp_apispec" 26 + ]; 27 + 28 + # Requires pytest-sanic, currently broken in nixpkgs 29 + doCheck = false; 30 + 31 + meta = with lib; { 32 + description = "Build and document REST APIs with aiohttp and apispec"; 33 + homepage = "https://github.com/maximdanilchenko/aiohttp-apispec/"; 34 + license = licenses.mit; 35 + maintainers = [ maintainers.viric ]; 36 + }; 37 + }
+47
pkgs/development/python-modules/apispec/3.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , fetchPypi 4 + , pyyaml 5 + , prance 6 + , marshmallow 7 + , pytestCheckHook 8 + , mock 9 + , openapi-spec-validator 10 + }: 11 + 12 + buildPythonPackage rec { 13 + pname = "apispec"; 14 + version = "3.3.2"; 15 + 16 + src = fetchPypi { 17 + inherit pname version; 18 + sha256 = "d23ebd5b71e541e031b02a19db10b5e6d5ef8452c552833e3e1afc836b40b1ad"; 19 + }; 20 + 21 + propagatedBuildInputs = [ 22 + pyyaml 23 + prance 24 + ]; 25 + 26 + postPatch = '' 27 + rm tests/test_ext_marshmallow.py 28 + ''; 29 + 30 + checkInputs = [ 31 + openapi-spec-validator 32 + marshmallow 33 + mock 34 + pytestCheckHook 35 + ]; 36 + 37 + pythonImportsCheck = [ 38 + "apispec" 39 + ]; 40 + 41 + meta = with lib; { 42 + description = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification"; 43 + homepage = "https://github.com/marshmallow-code/apispec"; 44 + license = licenses.mit; 45 + maintainers = [ maintainers.viric ]; 46 + }; 47 + }
+1 -1
pkgs/development/python-modules/jinja2/2.nix
··· 24 24 doCheck = !stdenv.is32bit || isPy3k; 25 25 26 26 checkPhase = '' 27 - pytest -v tests 27 + pytest -v tests -W ignore::ResourceWarning -W ignore::DeprecationWarning 28 28 ''; 29 29 30 30 meta = with lib; {
+1 -1
pkgs/development/python-modules/webargs/default.nix
··· 16 16 "webargs" 17 17 ]; 18 18 19 - 20 19 propagatedBuildInputs = [ marshmallow ]; 20 + 21 21 checkInputs = [ 22 22 pytestCheckHook 23 23 pytest-aiohttp
+2 -2
pkgs/top-level/python-packages.nix
··· 9934 9934 9935 9935 weasyprint = callPackage ../development/python-modules/weasyprint { }; 9936 9936 9937 + webargs = callPackage ../development/python-modules/webargs { }; 9938 + 9937 9939 webapp2 = callPackage ../development/python-modules/webapp2 { }; 9938 9940 9939 9941 webassets = callPackage ../development/python-modules/webassets { }; ··· 9951 9953 webexteamssdk = callPackage ../development/python-modules/webexteamssdk { }; 9952 9954 9953 9955 webhelpers = callPackage ../development/python-modules/webhelpers { }; 9954 - 9955 - webargs = callPackage ../development/python-modules/webargs { }; 9956 9956 9957 9957 webob = callPackage ../development/python-modules/webob { }; 9958 9958