Merge pull request #325297 from eclairevoyant/fix-tribler

tribler: fix runtime failure; libtorrent-rasterbar-2_0_x, libtorrent-rasterbar-1_2_x: migrate to pkgs/by-name
This commit is contained in:
❄️ 2024-07-11 07:55:22 -03:00 committed by GitHub
commit 30ed999c53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 24 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf { lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf
, zlib, boost, openssl, libtool, python, libiconv, ncurses, SystemConfiguration , zlib, boost, openssl, libtool, python311, libiconv, ncurses, darwin
}: }:
let let
@ -7,7 +7,7 @@ let
# Make sure we override python, so the correct version is chosen # Make sure we override python, so the correct version is chosen
# for the bindings, if overridden # for the bindings, if overridden
boostPython = boost.override { enablePython = true; inherit python; }; boostPython = boost.override { enablePython = true; python = python311; };
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "libtorrent-rasterbar"; pname = "libtorrent-rasterbar";
@ -24,14 +24,14 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ automake autoconf libtool pkg-config ]; nativeBuildInputs = [ automake autoconf libtool pkg-config ];
buildInputs = [ boostPython openssl zlib python libiconv ncurses ] buildInputs = [ boostPython openssl zlib python311 libiconv ncurses ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
preConfigure = "./autotool.sh"; preConfigure = "./autotool.sh";
postInstall = '' postInstall = ''
moveToOutput "include" "$dev" moveToOutput "include" "$dev"
moveToOutput "lib/${python.libPrefix}" "$python" moveToOutput "lib/${python311.libPrefix}" "$python"
''; '';
outputs = [ "out" "dev" "python" ]; outputs = [ "out" "dev" "python" ];
@ -48,7 +48,7 @@ in stdenv.mkDerivation {
description = "C++ BitTorrent implementation focusing on efficiency and scalability"; description = "C++ BitTorrent implementation focusing on efficiency and scalability";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ ]; maintainers = [ ];
broken = true; # ModuleNotFoundError: No module named 'distutils' broken = stdenv.isDarwin;
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchFromGitHub, cmake { lib, stdenv, fetchFromGitHub, cmake
, zlib, boost, openssl, python, ncurses, SystemConfiguration , zlib, boost, openssl, python3, ncurses, darwin
}: }:
let let
version = "2.0.10"; version = "2.0.10";
# Make sure we override python, so the correct version is chosen # Make sure we override python, so the correct version is chosen
boostPython = boost.override { enablePython = true; inherit python; }; boostPython = boost.override { enablePython = true; python = python3; };
in stdenv.mkDerivation { in stdenv.mkDerivation {
pname = "libtorrent-rasterbar"; pname = "libtorrent-rasterbar";
@ -22,8 +22,8 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ boostPython openssl zlib python ncurses ] buildInputs = [ boostPython openssl zlib python3 ncurses ]
++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
patches = [ patches = [
# provide distutils alternative for python 3.12 # provide distutils alternative for python 3.12
@ -42,7 +42,7 @@ in stdenv.mkDerivation {
postInstall = '' postInstall = ''
moveToOutput "include" "$dev" moveToOutput "include" "$dev"
moveToOutput "lib/${python.libPrefix}" "$python" moveToOutput "lib/${python3.libPrefix}" "$python"
''; '';
postFixup = '' postFixup = ''

View File

@ -3,7 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
fetchPypi, fetchPypi,
python3, python311,
makeWrapper, makeWrapper,
libtorrent-rasterbar-1_2_x, libtorrent-rasterbar-1_2_x,
qt5, qt5,
@ -11,6 +11,8 @@
}: }:
let let
# libtorrent-rasterbar-1_2_x requires python311
python3 = python311;
libtorrent = (python3.pkgs.toPythonModule (libtorrent-rasterbar-1_2_x)).python; libtorrent = (python3.pkgs.toPythonModule (libtorrent-rasterbar-1_2_x)).python;
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -75,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
# requirements.txt # requirements.txt
pillow pillow
pyqt5 pyqt5
#pyqt5-sip pyqt5-sip
pyqtgraph pyqtgraph
pyqtwebengine pyqtwebengine
]); ]);

View File

@ -22627,16 +22627,6 @@ with pkgs;
libtomcrypt = callPackage ../development/libraries/libtomcrypt { }; libtomcrypt = callPackage ../development/libraries/libtomcrypt { };
libtorrent-rasterbar-2_0_x = callPackage ../development/libraries/libtorrent-rasterbar {
inherit (darwin.apple_sdk.frameworks) SystemConfiguration;
python = python3;
};
libtorrent-rasterbar-1_2_x = callPackage ../development/libraries/libtorrent-rasterbar/1.2.nix {
inherit (darwin.apple_sdk.frameworks) SystemConfiguration;
python = python3;
};
libtorrent-rasterbar = libtorrent-rasterbar-2_0_x; libtorrent-rasterbar = libtorrent-rasterbar-2_0_x;
libtpms = callPackage ../tools/security/libtpms { }; libtpms = callPackage ../tools/security/libtpms { };

View File

@ -6881,7 +6881,7 @@ self: super: with self; {
libtmux = callPackage ../development/python-modules/libtmux { }; libtmux = callPackage ../development/python-modules/libtmux { };
libtorrent-rasterbar = (toPythonModule (pkgs.libtorrent-rasterbar.override { inherit python; })).python; libtorrent-rasterbar = (toPythonModule (pkgs.libtorrent-rasterbar.override { python3 = python; })).python;
libusb1 = callPackage ../development/python-modules/libusb1 { libusb1 = callPackage ../development/python-modules/libusb1 {
inherit (pkgs) libusb1; inherit (pkgs) libusb1;