Merge pull request #326236 from eclairevoyant/frescobaldi-fix

frescobaldi: fix build; cleanup deps
This commit is contained in:
OTABI Tomoya 2024-08-07 17:51:58 +09:00 committed by GitHub
commit de7067cf2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 37 additions and 44 deletions

View File

@ -1,28 +1,20 @@
{
lib,
setuptools,
stdenv,
pythonPackages,
fetchPypi,
pkg-config,
qmake,
qtbase,
qtsvg,
qtwebengine,
qtwebchannel,
qtdeclarative,
wrapQtAppsHook,
libsForQt5,
darwin,
buildPythonPackage,
python,
isPy27,
pyqt5,
sip,
pyqt-builder,
}:
let
inherit (pythonPackages)
buildPythonPackage
python
isPy27
pyqt5
sip
pyqt-builder
;
inherit (darwin) autoSignDarwinBinariesHook;
in
buildPythonPackage (
@ -52,32 +44,33 @@ buildPythonPackage (
nativeBuildInputs =
[
pkg-config
qmake
libsForQt5.qmake
libsForQt5.wrapQtAppsHook
]
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ sip ]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
python.pythonOnBuildForHost.pkgs.sip
]
++ [
qtbase
qtsvg
qtwebengine
libsForQt5.qtbase
libsForQt5.qtsvg
libsForQt5.qtwebengine
pyqt-builder
pythonPackages.setuptools
setuptools
]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ qtdeclarative ]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ libsForQt5.qtdeclarative ]
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ];
buildInputs =
[
sip
qtbase
qtsvg
qtwebengine
libsForQt5.qtbase
libsForQt5.qtsvg
libsForQt5.qtwebengine
]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
qtwebchannel
qtdeclarative
libsForQt5.qtwebchannel
libsForQt5.qtdeclarative
];
propagatedBuildInputs = [ pyqt5 ];
@ -98,21 +91,21 @@ buildPythonPackage (
enableParallelBuilding = true;
passthru = {
inherit wrapQtAppsHook;
inherit (libsForQt5) wrapQtAppsHook;
};
meta = with lib; {
meta = {
description = "Python bindings for Qt5";
homepage = "http://www.riverbankcomputing.co.uk";
license = licenses.gpl3;
hydraPlatforms = lib.lists.intersectLists qtwebengine.meta.platforms platforms.mesaPlatforms;
license = lib.licenses.gpl3;
hydraPlatforms = lib.lists.intersectLists libsForQt5.qtwebengine.meta.platforms lib.platforms.mesaPlatforms;
};
}
// lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
# TODO: figure out why the env hooks aren't adding these inclusions automatically
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
"-I${lib.getDev qtbase}/include/QtPrintSupport/"
"-I${lib.getDev qtwebchannel}/include/QtWebChannel/"
"-I${lib.getDev libsForQt5.qtbase}/include/QtPrintSupport/"
"-I${lib.getDev libsForQt5.qtwebchannel}/include/QtWebChannel/"
];
}
)

View File

@ -2,11 +2,13 @@
lib,
fetchFromGitHub,
buildPythonPackage,
python3Packages,
pythonOlder,
pyqt5,
poppler-qt5,
pycups,
}:
python3Packages.buildPythonPackage rec {
buildPythonPackage rec {
pname = "qpageview";
version = "0.6.2";
format = "setuptools";
@ -20,7 +22,7 @@ python3Packages.buildPythonPackage rec {
hash = "sha256-XFMTOD7ums8sbFHUViEI9q6/rCjUmEtXAdd3/OmLsHU=";
};
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = [
pyqt5
poppler-qt5
pycups

View File

@ -1,6 +1,6 @@
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }:
{ lib, stdenv, fetchFromGitHub, python311Packages, lilypond }:
buildPythonApplication rec {
python311Packages.buildPythonApplication rec {
pname = "frescobaldi";
version = "3.3.0";
@ -11,7 +11,7 @@ buildPythonApplication rec {
sha256 = "sha256-Q6ruthNcpjLlYydUetkuTECiCIzu055bw40O8BPGq/A=";
};
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python311Packages; [
qpageview
lilypond
pygame
@ -22,7 +22,7 @@ buildPythonApplication rec {
pyqtwebengine
];
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
nativeBuildInputs = [ python311Packages.pyqtwebengine.wrapQtAppsHook ];
# Needed because source is fetched from git
preBuild = ''

View File

@ -7968,7 +7968,7 @@ with pkgs;
wxGTK = wxGTK32;
};
frescobaldi = python3Packages.callPackage ../misc/frescobaldi { };
frescobaldi = callPackage ../misc/frescobaldi { };
freshfetch = callPackage ../tools/misc/freshfetch {
inherit (darwin.apple_sdk.frameworks) AppKit CoreFoundation DiskArbitration Foundation IOKit;

View File

@ -12031,9 +12031,7 @@ self: super: with self; {
pyqtgraph = callPackage ../development/python-modules/pyqtgraph { };
pyqtwebengine = pkgs.libsForQt5.callPackage ../development/python-modules/pyqtwebengine {
pythonPackages = self;
};
pyqtwebengine = callPackage ../development/python-modules/pyqtwebengine { };
pyquery = callPackage ../development/python-modules/pyquery { };