Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ let
{
inherit perl;
inherit lib;
inherit buildPackages;
# Use a variant of mkDerivation that does not include wrapQtApplications
# to avoid cyclic dependencies between Qt modules.
mkDerivation =
Expand Down Expand Up @@ -317,7 +318,7 @@ let

qmake = makeSetupHook {
name = "qmake-hook";
propagatedBuildInputs = [ self.qtbase.dev ];
depsTargetTargetPropagated = [ self.qtbase.dev ];
substitutions = {
inherit debug;
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
Expand All @@ -326,7 +327,8 @@ let

wrapQtAppsHook = makeSetupHook {
name = "wrap-qt5-apps-hook";
propagatedBuildInputs = [ self.qtbase.dev buildPackages.makeBinaryWrapper ]
propagatedBuildInputs = [ buildPackages.makeBinaryWrapper ];
depsTargetTargetPropagated = [ self.qtbase.dev ]
++ lib.optional stdenv.isLinux self.qtwayland.dev;
} ../hooks/wrap-qt-apps-hook.sh;
} // lib.optionalAttrs config.allowAliases {
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/qt-5/modules/qtbase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
, developerBuild ? false
, decryptSslTraffic ? false
, testers
, buildPackages
}:

let
Expand Down Expand Up @@ -82,6 +83,11 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ]
++ lib.optionals stdenv.isDarwin [ xcbuild ];

# `qtbase` expects to find `cc` (with no prefix) in the
# `$PATH`, so the following is needed even if
# `stdenv.buildPlatform.canExecute stdenv.hostPlatform`
depsBuildBuild = [ buildPackages.stdenv.cc ];

propagatedNativeBuildInputs = [ lndir ];

# libQt5Core links calls CoreFoundation APIs that call into the system ICU. Binaries linked
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/libraries/qt-5/qtModule.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ lib, mkDerivation, perl }:
{ lib, mkDerivation, perl
, buildPackages
}:

let inherit (lib) licenses maintainers platforms; in

Expand All @@ -16,8 +18,10 @@ mkDerivation (args // {
inherit pname version src;
patches = (args.patches or []) ++ (patches.${pname} or []);

nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake self.qtbase.dev ];

propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
depsBuildBuild = [ buildPackages.stdenv.cc ];

outputs = args.outputs or [ "out" "dev" ];
setOutputFlags = args.setOutputFlags or false;
Expand Down
37 changes: 35 additions & 2 deletions pkgs/development/python-modules/pyqt/5.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
, withLocation ? false
, withSerialPort ? false
, withTools ? false
, pkgsBuildTarget
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -55,6 +56,37 @@ buildPythonPackage rec {
minimum-macos-version = "11.0"
'' + ''
EOF
''

# pyqt-builder tries to compile *and run* these programs. This
# is really sad because the only thing they do is print out a
# flag based on whether or not some compile-time symbol was
# defined. This could all be done without having to *execute*
# cross-compiled programs!
#
# Here is the complete list of things checked:
#
# QT_NO_PRINTDIALOG => PyQt_PrintDialog
# QT_NO_PRINTER => PyQt_Printer
# QT_NO_PRINTPREVIEWDIALOG => PyQt_PrintPreviewDialog
# QT_NO_PRINTPREVIEWWIDGET => PyQt_PrintPreviewWidget
# QT_NO_SSL => PyQt_SSL
# QT_SHARED || QT_DLL => shared (otherwise static)
# QT_NO_PROCESS => PyQt_Process
# QT_NO_FPU || Q_PROCESSOR_ARM || Q_OS_WINCE => PyQt_qreal_double
# sizeof (qreal) != sizeof (double) => PyQt_qreal_double
# !Q_COMPILER_CONSTEXPR !Q_COMPILER_UNIFORM_INIT => PyQt_CONSTEXPR
# QT_NO_ACCESSIBILITY => PyQt_Accessibility
# QT_NO_OPENGL => PyQt_OpenGL PyQt_Desktop_OpenGL
# defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3) => PyQt_Desktop_OpenGL
# QT_NO_RAWFONT => PyQt_RawFont
# QT_NO_SESSIONMANAGER => PyQt_SessionManager
#
+ lib.optionalString (!(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) ''
rm config-tests/cfgtest_QtCore.cpp
rm config-tests/cfgtest_QtGui.cpp
rm config-tests/cfgtest_QtNetwork.cpp
rm config-tests/cfgtest_QtPrintSupport.cpp
'';

enableParallelBuilding = true;
Expand All @@ -72,12 +104,13 @@ buildPythonPackage rec {

dontWrapQtApps = true;

nativeBuildInputs = with libsForQt5; [
nativeBuildInputs = (with libsForQt5; [
pkg-config
qmake
setuptools
lndir
sip
]) ++ (with pkgsBuildTarget.targetPackages.libsForQt5; [
qtbase
qtsvg
qtdeclarative
Expand All @@ -90,7 +123,7 @@ buildPythonPackage rec {
++ lib.optional withLocation qtlocation
++ lib.optional withSerialPort qtserialport
++ lib.optional withTools qttools
;
);

buildInputs = with libsForQt5; [
dbus
Expand Down
4 changes: 2 additions & 2 deletions pkgs/misc/frescobaldi/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }:
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond, gettext }:

buildPythonApplication rec {
pname = "frescobaldi";
Expand All @@ -22,7 +22,7 @@ buildPythonApplication rec {
pyqtwebengine
];

nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook gettext ];

# Needed because source is fetched from git
preBuild = ''
Expand Down