python3Packages.pyipv8: 3.0.2197-unstable-2025-07-29 -> 3.1; tribler: 8.2.3 -> 8.2.3-unstable-2025-10-14 (#444792)

This commit is contained in:
dish
2025-10-27 22:16:03 +00:00
committed by GitHub
2 changed files with 52 additions and 53 deletions
+28 -37
View File
@@ -1,26 +1,23 @@
{
lib,
stdenv,
python312,
makeWrapper,
nix-update-script,
fetchFromGitHub,
rustPlatform,
buildNpmPackage,
nodejs_24,
wrapGAppsHook3,
libappindicator-gtk3,
}:
let
version = "8.2.3";
version = "8.2.3-unstable-2025-10-14";
python3 = python312;
nodejs = nodejs_24;
src = fetchFromGitHub {
owner = "tribler";
repo = "Tribler";
tag = "v${version}";
hash = "sha256-yThl3HhPtwi/pK5Rcr2ClVLY8uCnIyfvdc53A8gjKDg=";
rev = "3e5bc56a15c568d0ba41262cad63155445e062da";
hash = "sha256-zGh2nVcJyOwVfPEdU8ZDgANFt0KnTqEXU3I3ZOGot2c=";
};
tribler-webui = buildNpmPackage {
@@ -59,7 +56,6 @@ python3.pkgs.buildPythonApplication {
dependencies = with python3.pkgs; [
# requirements.txt
bitarray
configobj
pyipv8
ipv8-rust-tunnels
@@ -68,12 +64,17 @@ python3.pkgs.buildPythonApplication {
pillow
pony
pystray
# build/requirements.txt
cx-freeze
requests
];
nativeBuildInputs = [ wrapGAppsHook3 ];
buildInputs = with python3.pkgs; [
# setup.py requirements
pygobject3
setuptools
# sphinx requirements
sphinxHook
sphinx
@@ -81,43 +82,40 @@ python3.pkgs.buildPythonApplication {
sphinx-rtd-theme
astroid
# tray icon deps
wrapGAppsHook3
libappindicator-gtk3
# test phase requirements
pytestCheckHook
];
outputs = [
"out"
];
postPatch = ''
# fix the entrypoint
substituteInPlace build/setup.py --replace-fail '"tribler=tribler.run:main"' '"tribler=tribler.run:main_sync"'
substituteInPlace src/run_tribler.py --replace-fail 'if __name__ == "__main__":' 'def main_sync():'
# ValueError: ZIP does not support timestamps before 1980
substituteInPlace build/win/build.py --replace-fail "if {'setup.py', 'bdist_wheel'}.issubset(sys.argv):" "if True:"
# copy the built webui
rm -r src/tribler/ui
ln -s ${tribler-webui} src/tribler/ui
'';
buildPhase = ''
# fix the entrypoint
substituteInPlace build/setup.py --replace-fail '"tribler=tribler.run:main"' '"tribler=tribler.run:main_sync"'
substituteInPlace src/run_tribler.py --replace-fail 'if __name__ == "__main__":' 'def main_sync():'
runHook preBuild
# copy the built webui
rm -r src/tribler/ui
ln -s ${tribler-webui} src/tribler/ui
export GITHUB_TAG=v${version}
python3 build/debian/update_metainfo.py
python3 build/setup.py bdist_wheel
# build the docs
# FIXME: make doc SPHINXBUILD=${lib.getExe' python3.pkgs.sphinx "sphinx-build"}
# build the wheel
substituteInPlace build/win/build.py --replace-fail "if {'setup.py', 'bdist_wheel'}.issubset(sys.argv):" "if True:"
export GITHUB_TAG=v${version}
python3 build/debian/update_metainfo.py
python3 build/setup.py bdist_wheel
runHook pytestCheckHook
# build the docs
runHook sphinxHook
runHook postBuild
'';
postInstall = ''
ln -s ${tribler-webui} $out/lib/python3.12/site-packages/tribler/ui
ln -s ${tribler-webui} $out/lib/python*/site-packages/tribler/ui
'';
preFixup = ''
@@ -126,10 +124,6 @@ python3.pkgs.buildPythonApplication {
)
'';
postFixup = ''
runHook wrapGAppsHook3
'';
disabledTests = [
"test_request_for_version"
"test_establish_connection"
@@ -139,9 +133,6 @@ python3.pkgs.buildPythonApplication {
"test_get_set_explicit"
];
disabledTestPaths = [
];
passthru.updateScript = nix-update-script { };
meta = {
@@ -1,33 +1,37 @@
{
lib,
fetchPypi,
buildPythonPackage,
fetchFromGitHub,
cryptography,
libnacl,
aiohttp,
aiohttp-apispec,
pyopenssl,
pyasn1,
marshmallow,
typing-extensions,
packaging,
apispec,
buildPythonPackage,
cryptography,
fetchFromGitHub,
libnacl,
marshmallow,
packaging,
pyasn1,
pyopenssl,
setuptools,
pytestCheckHook,
typing-extensions,
}:
buildPythonPackage {
buildPythonPackage rec {
pname = "pyipv8";
version = "3.0.2197-unstable-2025-07-29";
format = "setuptools";
version = "3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "tribler";
repo = "py-ipv8";
rev = "db39b85f4c28880dee24d1b59d8eae8ca8b9c03d";
hash = "sha256-VIcBPzpK8Cdaz/dRp9QK/MtK41jm8rs/pxnLS716FNM=";
tag = version;
hash = "sha256-HamjKVuBPSicoP/GldO5kg2Eay50ti03wzeNaPAl0qI=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
cryptography
libnacl
aiohttp
@@ -40,7 +44,11 @@ buildPythonPackage {
apispec
];
doCheck = false;
doCheck = true;
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
description = "Python implementation of Tribler's IPv8 p2p-networking layer";