3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #125572 from prusnak/qt5-darwin

This commit is contained in:
Sandro 2021-07-26 09:15:45 +00:00 committed by GitHub
commit 4c095c59ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -5,7 +5,7 @@
coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3, coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3,
which, which,
# darwin support # darwin support
darwin, libiconv, darwin, libiconv, xcbuild,
dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite, dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite,
libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng,
@ -90,7 +90,8 @@ stdenv.mkDerivation {
++ lib.optional (postgresql != null) postgresql; ++ lib.optional (postgresql != null) postgresql;
nativeBuildInputs = nativeBuildInputs =
[ bison flex gperf lndir perl pkg-config which ]; [ bison flex gperf lndir perl pkg-config which ]
++ lib.optionals stdenv.isDarwin [ xcbuild ];
propagatedNativeBuildInputs = [ lndir ]; propagatedNativeBuildInputs = [ lndir ];
@ -131,22 +132,16 @@ stdenv.mkDerivation {
then then
'' ''
sed -i \ sed -i \
-e 's|! /usr/bin/xcode-select --print-path >/dev/null 2>&1;|false;|' \ -e 's|/usr/bin/xcode-select|xcode-select|' \
-e 's|! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1;|false;|' \ -e 's|/usr/bin/xcrun|xcrun|' \
-e 's|sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)|sysroot=/nonsense|' \ -e 's|/usr/bin/xcodebuild|xcodebuild|' \
-e 's|sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)|sysroot=/nonsense|' \
-e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \ -e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \
-e 's|XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`|XCRUN="clang -v 2>&1"|' \
-e 's#sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d \x27 \x27 -f 1))##' \
-e 's#val=$(echo $sdk_val $(echo $val | cut -s -d \x27 \x27 -f 2-))##' \
./configure ./configure
substituteInPlace ./mkspecs/common/mac.conf \ substituteInPlace ./mkspecs/common/mac.conf \
--replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" --replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/"
substituteInPlace ./mkspecs/common/mac.conf \ substituteInPlace ./mkspecs/common/mac.conf \
--replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" --replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/"
'' ''
# Note on the above: \x27 is a way if including a single-quote
# character in the sed string arguments.
else else
lib.optionalString libGLSupported lib.optionalString libGLSupported
'' ''

View file

@ -220,7 +220,6 @@ qtModule {
dontUseNinjaBuild = true; dontUseNinjaBuild = true;
dontUseNinjaInstall = true; dontUseNinjaInstall = true;
dontUseXcbuild = true;
postInstall = lib.optionalString stdenv.isLinux '' postInstall = lib.optionalString stdenv.isLinux ''
cat > $out/libexec/qt.conf <<EOF cat > $out/libexec/qt.conf <<EOF