Unverified Commit c9d72a6f authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #302361 from nim65s/pythonqt

python-qt: 3.4.2 -> 3.5.1
parents 1a8423b7 bcaf5dd0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
{ lib, stdenv, csound, desktop-file-utils,
  fetchFromGitHub, python, python-qt, qmake,
  fetchFromGitHub, python3, python-qt, qmake,
  qtwebengine, qtxmlpatterns, rtmidi, wrapQtAppsHook }:

stdenv.mkDerivation rec {
@@ -26,13 +26,13 @@ stdenv.mkDerivation rec {
                 "CSOUND_INCLUDE_DIR=${csound}/include/csound"
                 "CSOUND_LIBRARY_DIR=${csound}/lib"
                 "RTMIDI_DIR=${rtmidi.src}"
                 "PYTHONQT_SRC_DIR=${python-qt}/include/PythonQt"
                 "PYTHONQT_SRC_DIR=${python-qt.src}"
                 "PYTHONQT_LIB_DIR=${python-qt}/lib"
                 "LIBS+=-L${python-qt}/lib"
                 "INCLUDEPATH+=${python-qt}/include/PythonQt"
                 "INCLUDEPATH+=${python}/include/python${python.pythonVersion}"
                 "INSTALL_DIR=${placeholder "out"}"
                 "SHARE_DIR=${placeholder "out"}/share"
                 "PYTHON_DIR=${python3}"
                 "PYTHON_VERSION=3.${python3.sourceVersion.minor}"
                 ];

  meta = with lib; {
+34 −22
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, fetchpatch, python, qmake,
  qtwebengine, qtxmlpatterns,
  qttools, unzip }:
{
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  python3,
  qmake,
  qtwebengine,
  qtxmlpatterns,
  qttools,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "python-qt";
  version = "3.4.2";
  version = "3.5.1";

  src = fetchFromGitHub {
    owner = "MeVisLab";
    repo = "pythonqt";
    rev = "v${version}";
    hash = "sha256-xJYOD07ACOKtY3psmfHNSCjm6t0fr8JU9CrL0w5P5G0=";
    rev = "v${finalAttrs.version}";
    hash = "sha256-IED6UFk8UTle7g/yPC0nXOEgJwrs6sB/Dk3OTyVgHPo=";
  };

  # https://github.com/CsoundQt/CsoundQt/blob/develop/BUILDING.md#pythonqt
  postPatch = ''
    substituteInPlace build/python.prf \
      --replace "PYTHON_VERSION=2.7" "PYTHON_VERSION=${python.pythonVersion}"
  '';

  hardeningDisable = [ "all" ];

  nativeBuildInputs = [ qmake qtwebengine qtxmlpatterns qttools unzip ];
  nativeBuildInputs = [
    qmake
    qttools
    qtxmlpatterns
    qtwebengine
  ];

  buildInputs = [ python ];
  buildInputs = [ python3 ];

  qmakeFlags = [
    "PythonQt.pro"
    "PYTHON_DIR=${python}"
    "PYTHON_DIR=${python3}"
    "PYTHON_VERSION=3.${python3.sourceVersion.minor}"
  ];

  dontWrapQtApps = true;

  unpackCmd = "unzip $src";

  installPhase = ''
    mkdir -p $out/include/PythonQt
    cp -r ./lib $out
@@ -42,6 +45,15 @@ stdenv.mkDerivation rec {
    cp -r ./extensions $out/include/PythonQt
  '';

  preFixup = lib.optionalString stdenv.isDarwin ''
    install_name_tool -id \
      $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib \
      $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib
    install_name_tool -id \
      $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib \
      $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib
  '';

  meta = with lib; {
    description = "PythonQt is a dynamic Python binding for the Qt framework. It offers an easy way to embed the Python scripting language into your C++ Qt applications";
    homepage = "https://pythonqt.sourceforge.net/";
@@ -49,4 +61,4 @@ stdenv.mkDerivation rec {
    platforms = platforms.all;
    maintainers = with maintainers; [ hlolli ];
  };
}
})
+2 −13
Original line number Diff line number Diff line
@@ -24071,16 +24071,7 @@ with pkgs;
  pylode = callPackage ../misc/pylode { };
  python-qt = (callPackage ../development/libraries/python-qt {
    python = python3;
    inherit (builtins.mapAttrs (_: pkg: pkg.override (previousArgs: lib.optionalAttrs (previousArgs ? stdenv) { stdenv = gcc12Stdenv; })) qt5)
      qmake qttools qtwebengine qtxmlpatterns;
    stdenv = gcc12Stdenv;
  })
  .overrideAttrs(previousAttrs: {
    NIX_CFLAGS_COMPILE = "-w";
    meta = previousAttrs.meta // { broken = true; };
  });
  python-qt = libsForQt5.callPackage ../development/libraries/python-qt { };
  pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { };
@@ -30344,9 +30335,7 @@ with pkgs;
  csound-manual = callPackage ../applications/audio/csound/csound-manual { };
  csound-qt = libsForQt5.callPackage ../applications/audio/csound/csound-qt {
    python = python3;
  };
  csound-qt = libsForQt5.callPackage ../applications/audio/csound/csound-qt { };
  codeblocks = callPackage ../applications/editors/codeblocks { };
  codeblocksFull = codeblocks.override { contribPlugins = true; };