Unverified Commit 30ed999c authored by superherointj's avatar superherointj Committed by GitHub
Browse files

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
parents 503a4396 8d7f6c2e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, pkg-config, automake, autoconf
, zlib, boost, openssl, libtool, python, libiconv, ncurses, SystemConfiguration
, zlib, boost, openssl, libtool, python311, libiconv, ncurses, darwin
}:

let
@@ -7,7 +7,7 @@ let

  # Make sure we override python, so the correct version is chosen
  # for the bindings, if overridden
  boostPython = boost.override { enablePython = true; inherit python; };
  boostPython = boost.override { enablePython = true; python = python311; };

in stdenv.mkDerivation {
  pname = "libtorrent-rasterbar";
@@ -24,14 +24,14 @@ in stdenv.mkDerivation {

  nativeBuildInputs = [ automake autoconf libtool pkg-config ];

  buildInputs = [ boostPython openssl zlib python libiconv ncurses ]
    ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
  buildInputs = [ boostPython openssl zlib python311 libiconv ncurses ]
    ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];

  preConfigure = "./autotool.sh";

  postInstall = ''
    moveToOutput "include" "$dev"
    moveToOutput "lib/${python.libPrefix}" "$python"
    moveToOutput "lib/${python311.libPrefix}" "$python"
  '';

  outputs = [ "out" "dev" "python" ];
@@ -48,7 +48,7 @@ in stdenv.mkDerivation {
    description = "C++ BitTorrent implementation focusing on efficiency and scalability";
    license = licenses.bsd3;
    maintainers = [ ];
    broken = true; # ModuleNotFoundError: No module named 'distutils'
    broken = stdenv.isDarwin;
    platforms = platforms.unix;
  };
}
+5 −5
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake
, zlib, boost, openssl, python, ncurses, SystemConfiguration
, zlib, boost, openssl, python3, ncurses, darwin
}:

let
  version = "2.0.10";

  # 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 {
  pname = "libtorrent-rasterbar";
@@ -22,8 +22,8 @@ in stdenv.mkDerivation {

  nativeBuildInputs = [ cmake ];

  buildInputs = [ boostPython openssl zlib python ncurses ]
    ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
  buildInputs = [ boostPython openssl zlib python3 ncurses ]
    ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];

  patches = [
    # provide distutils alternative for python 3.12
@@ -42,7 +42,7 @@ in stdenv.mkDerivation {

  postInstall = ''
    moveToOutput "include" "$dev"
    moveToOutput "lib/${python.libPrefix}" "$python"
    moveToOutput "lib/${python3.libPrefix}" "$python"
  '';

  postFixup = ''
+4 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
  stdenv,
  fetchurl,
  fetchPypi,
  python3,
  python311,
  makeWrapper,
  libtorrent-rasterbar-1_2_x,
  qt5,
@@ -11,6 +11,8 @@
}:

let
  # libtorrent-rasterbar-1_2_x requires python311
  python3 = python311;
  libtorrent = (python3.pkgs.toPythonModule (libtorrent-rasterbar-1_2_x)).python;
in
stdenv.mkDerivation (finalAttrs: {
@@ -75,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
      # requirements.txt
      pillow
      pyqt5
      #pyqt5-sip
      pyqt5-sip
      pyqtgraph
      pyqtwebengine
    ]);
+0 −10
Original line number Diff line number Diff line
@@ -22627,16 +22627,6 @@ with pkgs;
  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;
  libtpms = callPackage ../tools/security/libtpms { };
Loading