Merge pull request #302361 from nim65s/pythonqt

python-qt: 3.4.2 -> 3.5.1
This commit is contained in:
Pol Dellaiera 2024-04-22 10:24:38 +02:00 committed by GitHub
commit c9d72a6fd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 40 additions and 39 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, csound, desktop-file-utils, { lib, stdenv, csound, desktop-file-utils,
fetchFromGitHub, python, python-qt, qmake, fetchFromGitHub, python3, python-qt, qmake,
qtwebengine, qtxmlpatterns, rtmidi, wrapQtAppsHook }: qtwebengine, qtxmlpatterns, rtmidi, wrapQtAppsHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -26,13 +26,13 @@ stdenv.mkDerivation rec {
"CSOUND_INCLUDE_DIR=${csound}/include/csound" "CSOUND_INCLUDE_DIR=${csound}/include/csound"
"CSOUND_LIBRARY_DIR=${csound}/lib" "CSOUND_LIBRARY_DIR=${csound}/lib"
"RTMIDI_DIR=${rtmidi.src}" "RTMIDI_DIR=${rtmidi.src}"
"PYTHONQT_SRC_DIR=${python-qt}/include/PythonQt" "PYTHONQT_SRC_DIR=${python-qt.src}"
"PYTHONQT_LIB_DIR=${python-qt}/lib" "PYTHONQT_LIB_DIR=${python-qt}/lib"
"LIBS+=-L${python-qt}/lib" "LIBS+=-L${python-qt}/lib"
"INCLUDEPATH+=${python-qt}/include/PythonQt"
"INCLUDEPATH+=${python}/include/python${python.pythonVersion}"
"INSTALL_DIR=${placeholder "out"}" "INSTALL_DIR=${placeholder "out"}"
"SHARE_DIR=${placeholder "out"}/share" "SHARE_DIR=${placeholder "out"}/share"
"PYTHON_DIR=${python3}"
"PYTHON_VERSION=3.${python3.sourceVersion.minor}"
]; ];
meta = with lib; { meta = with lib; {

View File

@ -1,39 +1,42 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, python, qmake, {
qtwebengine, qtxmlpatterns, lib,
qttools, unzip }: stdenv,
fetchFromGitHub,
fetchpatch,
python3,
qmake,
qtwebengine,
qtxmlpatterns,
qttools,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "python-qt"; pname = "python-qt";
version = "3.4.2"; version = "3.5.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MeVisLab"; owner = "MeVisLab";
repo = "pythonqt"; repo = "pythonqt";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-xJYOD07ACOKtY3psmfHNSCjm6t0fr8JU9CrL0w5P5G0="; hash = "sha256-IED6UFk8UTle7g/yPC0nXOEgJwrs6sB/Dk3OTyVgHPo=";
}; };
# https://github.com/CsoundQt/CsoundQt/blob/develop/BUILDING.md#pythonqt nativeBuildInputs = [
postPatch = '' qmake
substituteInPlace build/python.prf \ qttools
--replace "PYTHON_VERSION=2.7" "PYTHON_VERSION=${python.pythonVersion}" qtxmlpatterns
''; qtwebengine
];
hardeningDisable = [ "all" ]; buildInputs = [ python3 ];
nativeBuildInputs = [ qmake qtwebengine qtxmlpatterns qttools unzip ];
buildInputs = [ python ];
qmakeFlags = [ qmakeFlags = [
"PythonQt.pro" "PYTHON_DIR=${python3}"
"PYTHON_DIR=${python}" "PYTHON_VERSION=3.${python3.sourceVersion.minor}"
]; ];
dontWrapQtApps = true; dontWrapQtApps = true;
unpackCmd = "unzip $src";
installPhase = '' installPhase = ''
mkdir -p $out/include/PythonQt mkdir -p $out/include/PythonQt
cp -r ./lib $out cp -r ./lib $out
@ -42,6 +45,15 @@ stdenv.mkDerivation rec {
cp -r ./extensions $out/include/PythonQt 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; { 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"; 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/"; homepage = "https://pythonqt.sourceforge.net/";
@ -49,4 +61,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ hlolli ]; maintainers = with maintainers; [ hlolli ];
}; };
} })

View File

@ -24071,16 +24071,7 @@ with pkgs;
pylode = callPackage ../misc/pylode { }; pylode = callPackage ../misc/pylode { };
python-qt = (callPackage ../development/libraries/python-qt { python-qt = libsForQt5.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; };
});
pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { }; pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside { };
@ -30344,9 +30335,7 @@ with pkgs;
csound-manual = callPackage ../applications/audio/csound/csound-manual { }; csound-manual = callPackage ../applications/audio/csound/csound-manual { };
csound-qt = libsForQt5.callPackage ../applications/audio/csound/csound-qt { csound-qt = libsForQt5.callPackage ../applications/audio/csound/csound-qt { };
python = python3;
};
codeblocks = callPackage ../applications/editors/codeblocks { }; codeblocks = callPackage ../applications/editors/codeblocks { };
codeblocksFull = codeblocks.override { contribPlugins = true; }; codeblocksFull = codeblocks.override { contribPlugins = true; };