From e0532475bca400362a2a488e31c86c6628a8e55a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 28 Sep 2021 10:29:46 -0400 Subject: [PATCH] treewide: remove darwin-only manual wrapQtApp invocations --- pkgs/applications/audio/bambootracker/default.nix | 4 ---- pkgs/applications/audio/munt/default.nix | 1 - pkgs/applications/editors/mindforger/default.nix | 1 - pkgs/applications/gis/openorienteering-mapper/default.nix | 3 --- pkgs/applications/graphics/openscad/default.nix | 2 -- pkgs/applications/misc/goldendict/default.nix | 1 - pkgs/applications/misc/gpxlab/default.nix | 1 - pkgs/applications/misc/gpxsee/default.nix | 1 - pkgs/applications/misc/keepassx/community.nix | 5 ----- pkgs/applications/misc/lsd2dsl/default.nix | 3 --- pkgs/applications/misc/merkaartor/default.nix | 1 - pkgs/applications/misc/sleepyhead/default.nix | 4 ---- pkgs/applications/misc/xpdf/default.nix | 5 ----- .../networking/instant-messengers/chatterino2/default.nix | 3 --- .../networking/instant-messengers/tensor/default.nix | 1 - pkgs/applications/networking/irc/communi/default.nix | 2 -- pkgs/applications/networking/sniffers/wireshark/default.nix | 2 -- pkgs/applications/office/beamerpresenter/default.nix | 4 ---- pkgs/applications/science/astronomy/stellarium/default.nix | 4 ---- pkgs/applications/video/jellyfin-media-player/default.nix | 3 --- pkgs/development/libraries/libfive/default.nix | 2 -- pkgs/tools/audio/opl3bankeditor/common.nix | 1 - pkgs/tools/filesystems/android-file-transfer/default.nix | 3 --- pkgs/tools/graphics/gnuplot/default.nix | 2 -- pkgs/tools/text/glogg/default.nix | 1 - 25 files changed, 60 deletions(-) diff --git a/pkgs/applications/audio/bambootracker/default.nix b/pkgs/applications/audio/bambootracker/default.nix index 591c14c1adfa..b2cce97bbc46 100644 --- a/pkgs/applications/audio/bambootracker/default.nix +++ b/pkgs/applications/audio/bambootracker/default.nix @@ -30,13 +30,9 @@ mkDerivation rec { postConfigure = "make qmake_all"; - # 1. installs app bundle on darwin, move to app bundle dir & link binary to bin - # 2. wrapQtAppsHook fails to wrap mach-o binaries automatically, manually call wrapper - # (see https://github.com/NixOS/nixpkgs/issues/102044) postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/Applications mv $out/{bin,Applications}/BambooTracker.app - wrapQtApp $out/Applications/BambooTracker.app/Contents/MacOS/BambooTracker ln -s $out/{Applications/BambooTracker.app/Contents/MacOS,bin}/BambooTracker ''; diff --git a/pkgs/applications/audio/munt/default.nix b/pkgs/applications/audio/munt/default.nix index 191612700f41..93a9ce258544 100644 --- a/pkgs/applications/audio/munt/default.nix +++ b/pkgs/applications/audio/munt/default.nix @@ -36,7 +36,6 @@ mkDerivation rec { postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir $out/Applications mv $out/bin/${mainProgram}.app $out/Applications/ - wrapQtApp $out/Applications/${mainProgram}.app/Contents/MacOS/${mainProgram} ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram} ''; diff --git a/pkgs/applications/editors/mindforger/default.nix b/pkgs/applications/editors/mindforger/default.nix index 6b93153ec041..2f75fb34cd18 100644 --- a/pkgs/applications/editors/mindforger/default.nix +++ b/pkgs/applications/editors/mindforger/default.nix @@ -52,7 +52,6 @@ stdenv.mkDerivation rec { postInstall = lib.optionalString stdenv.isDarwin '' mkdir "$out"/Applications mv app/mindforger.app "$out"/Applications/ - wrapQtApp "$out"/Applications/mindforger.app/Contents/MacOS/mindforger ''; meta = with lib; { diff --git a/pkgs/applications/gis/openorienteering-mapper/default.nix b/pkgs/applications/gis/openorienteering-mapper/default.nix index 21b4cfa94b13..d186d36efcf8 100644 --- a/pkgs/applications/gis/openorienteering-mapper/default.nix +++ b/pkgs/applications/gis/openorienteering-mapper/default.nix @@ -76,9 +76,6 @@ mkDerivation rec { postInstall = with stdenv; lib.optionalString isDarwin '' mkdir -p $out/Applications mv $out/Mapper.app $out/Applications - # Fixes "This application failed to start because it could not find or load the Qt - # platform plugin "cocoa"." - wrapQtApp $out/Applications/Mapper.app/Contents/MacOS/Mapper mkdir -p $out/bin ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper ''; diff --git a/pkgs/applications/graphics/openscad/default.nix b/pkgs/applications/graphics/openscad/default.nix index c7be99469b05..be079b6bdb20 100644 --- a/pkgs/applications/graphics/openscad/default.nix +++ b/pkgs/applications/graphics/openscad/default.nix @@ -65,8 +65,6 @@ mkDerivation rec { mv $out/bin/*.app $out/Applications rmdir $out/bin || true - wrapQtApp "$out"/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD - mv --target-directory=$out/Applications/OpenSCAD.app/Contents/Resources \ $out/share/openscad/{examples,color-schemes,locale,libraries,fonts,templates} diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix index 03668e586117..f0eed5c1e2fc 100644 --- a/pkgs/applications/misc/goldendict/default.nix +++ b/pkgs/applications/misc/goldendict/default.nix @@ -56,7 +56,6 @@ mkDerivation rec { postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p $out/Applications mv GoldenDict.app $out/Applications - wrapQtApp $out/Applications/GoldenDict.app/Contents/MacOS/GoldenDict ''; meta = with lib; { diff --git a/pkgs/applications/misc/gpxlab/default.nix b/pkgs/applications/misc/gpxlab/default.nix index c8d6eb3b84c7..8d2b95ea4f31 100644 --- a/pkgs/applications/misc/gpxlab/default.nix +++ b/pkgs/applications/misc/gpxlab/default.nix @@ -28,7 +28,6 @@ mkDerivation rec { postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p $out/Applications mv GPXLab/GPXLab.app $out/Applications - wrapQtApp $out/Applications/GPXLab.app/Contents/MacOS/GPXLab ''; meta = with lib; { diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index f008ea439ed6..bbe77c182205 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -26,7 +26,6 @@ mkDerivation rec { postInstall = with stdenv; lib.optionalString isDarwin '' mkdir -p $out/Applications mv GPXSee.app $out/Applications - wrapQtApp $out/Applications/GPXSee.app/Contents/MacOS/GPXSee ''; meta = with lib; { diff --git a/pkgs/applications/misc/keepassx/community.nix b/pkgs/applications/misc/keepassx/community.nix index b4beab05acd1..47391a04e69a 100644 --- a/pkgs/applications/misc/keepassx/community.nix +++ b/pkgs/applications/misc/keepassx/community.nix @@ -115,11 +115,6 @@ stdenv.mkDerivation rec { ++ optional (stdenv.isDarwin && withKeePassTouchID) darwin.apple_sdk.frameworks.LocalAuthentication; - preFixup = optionalString stdenv.isDarwin '' - # Make it work without Qt in PATH. - wrapQtApp $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC - ''; - passthru.tests = nixosTests.keepassxc; meta = { diff --git a/pkgs/applications/misc/lsd2dsl/default.nix b/pkgs/applications/misc/lsd2dsl/default.nix index 8c884305277a..2dfbaeb9941a 100644 --- a/pkgs/applications/misc/lsd2dsl/default.nix +++ b/pkgs/applications/misc/lsd2dsl/default.nix @@ -30,9 +30,6 @@ mkDerivation rec { installPhase = '' install -Dm755 console/lsd2dsl gui/lsd2dsl-qtgui -t $out/bin - '' + lib.optionalString stdenv.isDarwin '' - wrapQtApp $out/bin/lsd2dsl - wrapQtApp $out/bin/lsd2dsl-qtgui ''; meta = with lib; { diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/applications/misc/merkaartor/default.nix index 90d91583a26f..eda540427bbd 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/applications/misc/merkaartor/default.nix @@ -50,7 +50,6 @@ mkDerivation rec { mkdir -p $out/Applications mv binaries/bin/merkaartor.app $out/Applications mv binaries/bin/plugins $out/Applications/merkaartor.app/Contents - wrapQtApp $out/Applications/merkaartor.app/Contents/MacOS/merkaartor ''; meta = with lib; { diff --git a/pkgs/applications/misc/sleepyhead/default.nix b/pkgs/applications/misc/sleepyhead/default.nix index bf8a9efb9fd0..94c47c23afef 100644 --- a/pkgs/applications/misc/sleepyhead/default.nix +++ b/pkgs/applications/misc/sleepyhead/default.nix @@ -33,10 +33,6 @@ in mkDerivation { cp sleepyhead/SleepyHead $out/bin ''; - postFixup = lib.optionalString stdenv.isDarwin '' - wrapQtApp "$out/Applications/SleepyHead.app/Contents/MacOS/SleepyHead" - ''; - meta = with lib; { homepage = "https://sleepyhead.jedimark.net/"; description = "Review and explore data produced by CPAP and related machines"; diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index e57fb75c11f1..eb5ebf3a7177 100644 --- a/pkgs/applications/misc/xpdf/default.nix +++ b/pkgs/applications/misc/xpdf/default.nix @@ -51,11 +51,6 @@ stdenv.mkDerivation rec { install -Dm644 $src/xpdf-qt/xpdf-icon.svg $out/share/pixmaps/xpdf.svg ''; - # wrapQtAppsHook broken on macOS (https://github.com/NixOS/nixpkgs/issues/102044) - postFixup = lib.optionalString stdenv.isDarwin '' - wrapQtApp $out/bin/xpdf - ''; - meta = with lib; { homepage = "https://www.xpdfreader.com"; description = "Viewer for Portable Document Format (PDF) files"; diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix index 99e3a90b60b6..7a2415199375 100644 --- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix +++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix @@ -16,9 +16,6 @@ mkDerivation rec { mkdir -p "$out/Applications" mv bin/chatterino.app "$out/Applications/" ''; - postFixup = lib.optionalString stdenv.isDarwin '' - wrapQtApp "$out/Applications/chatterino.app/Contents/MacOS/chatterino" - ''; meta = with lib; { description = "A chat client for Twitch chat"; longDescription = '' diff --git a/pkgs/applications/networking/instant-messengers/tensor/default.nix b/pkgs/applications/networking/instant-messengers/tensor/default.nix index 172d11f6b857..477e5442b829 100644 --- a/pkgs/applications/networking/instant-messengers/tensor/default.nix +++ b/pkgs/applications/networking/instant-messengers/tensor/default.nix @@ -34,7 +34,6 @@ mkDerivation rec { mkdir -p $out/Applications cp -r tensor.app $out/Applications/tensor.app - wrapQtApp $out/Applications/tensor.app/Contents/MacOS/tensor runHook postInstall '' else '' diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix index 9148a26567df..df7168ac308e 100644 --- a/pkgs/applications/networking/irc/communi/default.nix +++ b/pkgs/applications/networking/irc/communi/default.nix @@ -38,8 +38,6 @@ stdenv.mkDerivation rec { install_name_tool \ -add_rpath @executable_path/../Frameworks \ $out/Applications/Communi.app/Contents/MacOS/Communi - - wrapQtApp $out/Applications/Communi.app/Contents/MacOS/Communi '' else '' substituteInPlace "$out/share/applications/communi.desktop" \ --replace "/usr/bin" "$out/bin" diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 4e57bfe4b17e..1d4ec3537706 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -66,8 +66,6 @@ in stdenv.mkDerivation { install_name_tool -change "$dylib" "$out/lib/$dylib" "$f" done done - - wrapQtApp $out/Applications/Wireshark.app/Contents/MacOS/Wireshark '' else optionalString withQt '' install -Dm644 -t $out/share/applications ../wireshark.desktop diff --git a/pkgs/applications/office/beamerpresenter/default.nix b/pkgs/applications/office/beamerpresenter/default.nix index 351609d8c058..e898a43ad97c 100644 --- a/pkgs/applications/office/beamerpresenter/default.nix +++ b/pkgs/applications/office/beamerpresenter/default.nix @@ -37,10 +37,6 @@ stdenv.mkDerivation rec { done ''; - postInstall = lib.optionalString stdenv.isDarwin '' - wrapQtApp "$out"/bin/beamerpresenter.app/Contents/MacOS/beamerpresenter - ''; - meta = with lib; { description = "Modular multi screen pdf presentation software respecting your window manager"; homepage = "https://github.com/stiglers-eponym/BeamerPresenter"; diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 2e28d9d83e58..34ab10da0dd6 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -28,10 +28,6 @@ mkDerivation rec { 'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")' ''; - postFixup = lib.optionalString stdenv.isDarwin '' - wrapQtApp "$out"/Stellarium.app/Contents/MacOS/stellarium - ''; - meta = with lib; { description = "Free open-source planetarium"; homepage = "http://stellarium.org/"; diff --git a/pkgs/applications/video/jellyfin-media-player/default.nix b/pkgs/applications/video/jellyfin-media-player/default.nix index 8c23bfc5c298..82d34d188ff6 100644 --- a/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/pkgs/applications/video/jellyfin-media-player/default.nix @@ -94,9 +94,6 @@ mkDerivation rec { mv $out/Resources/* "$out/Applications/Jellyfin Media Player.app/Contents/Resources/" rmdir $out/Resources - # fix 'Could not find the Qt platform plugin "cocoa" in ""' error - wrapQtApp "$out/Applications/Jellyfin Media Player.app/Contents/MacOS/Jellyfin Media Player" - ln -s "$out/Applications/Jellyfin Media Player.app/Contents/MacOS/Jellyfin Media Player" $out/bin/jellyfinmediaplayer ''; diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index 3833a7fe880a..8634f05ebbc7 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -36,8 +36,6 @@ mkDerivation { -change libfive.dylib $out/lib/libfive.dylib \ -change libfive-guile.dylib $out/lib/libfive-guile.dylib \ $out/Applications/Studio.app/Contents/MacOS/Studio - - wrapQtApp $out/Applications/Studio.app/Contents/MacOS/Studio '' else '' # Link "Studio" binary to "libfive-studio" to be more obvious: ln -s "$out/bin/Studio" "$out/bin/libfive-studio" diff --git a/pkgs/tools/audio/opl3bankeditor/common.nix b/pkgs/tools/audio/opl3bankeditor/common.nix index 9f6972ce9540..04f4d3aae5ab 100644 --- a/pkgs/tools/audio/opl3bankeditor/common.nix +++ b/pkgs/tools/audio/opl3bankeditor/common.nix @@ -53,7 +53,6 @@ mkDerivation rec { mv "${binname}.app" $out/Applications/ install_name_tool -change {,${qwt}/lib/}libqwt.6.dylib "$out/Applications/${binname}.app/Contents/MacOS/${binname}" - wrapQtApp "$out/Applications/${binname}.app/Contents/MacOS/${binname}" ln -s "$out/Applications/${binname}.app/Contents/MacOS/${binname}" $out/bin/${mainProgram} ''; diff --git a/pkgs/tools/filesystems/android-file-transfer/default.nix b/pkgs/tools/filesystems/android-file-transfer/default.nix index a8511f8b99ae..b355b0eb6864 100644 --- a/pkgs/tools/filesystems/android-file-transfer/default.nix +++ b/pkgs/tools/filesystems/android-file-transfer/default.nix @@ -29,9 +29,6 @@ mkDerivation rec { postInstall = lib.optionalString stdenv.isDarwin '' mkdir $out/Applications mv $out/*.app $out/Applications - for f in $out/Applications/android-file-transfer.app/Contents/MacOS/*; do - wrapQtApp "$f" - done ''; meta = with lib; { diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index 741468dfd994..c6c90442ddce 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -58,8 +58,6 @@ in --prefix PATH : '${coreutils}/bin' \ --prefix PATH : '${fontconfig.bin}/bin' \ --run '. ${./set-gdfontpath-from-fontconfig.sh}' - '' + lib.optionalString (stdenv.isDarwin && withQt) '' - wrapQtApp $out/bin/gnuplot ''; enableParallelBuilding = true; diff --git a/pkgs/tools/text/glogg/default.nix b/pkgs/tools/text/glogg/default.nix index 306c25498ad3..855490df4ab4 100644 --- a/pkgs/tools/text/glogg/default.nix +++ b/pkgs/tools/text/glogg/default.nix @@ -25,7 +25,6 @@ mkDerivation rec { mkdir -p $out/Applications mv $out/bin/glogg.app $out/Applications/glogg.app rm -fr $out/{bin,share} - wrapQtApp $out/Applications/glogg.app/Contents/MacOS/glogg ''; meta = with lib; {