treewide: remove darwin-only manual wrapQtApp invocations

This commit is contained in:
Dmitry Kalinkin 2021-09-28 10:29:46 -04:00
parent ee33a90c56
commit e0532475bc
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333
25 changed files with 0 additions and 60 deletions

View file

@ -30,13 +30,9 @@ mkDerivation rec {
postConfigure = "make qmake_all"; 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 '' postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications
mv $out/{bin,Applications}/BambooTracker.app mv $out/{bin,Applications}/BambooTracker.app
wrapQtApp $out/Applications/BambooTracker.app/Contents/MacOS/BambooTracker
ln -s $out/{Applications/BambooTracker.app/Contents/MacOS,bin}/BambooTracker ln -s $out/{Applications/BambooTracker.app/Contents/MacOS,bin}/BambooTracker
''; '';

View file

@ -36,7 +36,6 @@ mkDerivation rec {
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications mkdir $out/Applications
mv $out/bin/${mainProgram}.app $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} ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram}
''; '';

View file

@ -52,7 +52,6 @@ stdenv.mkDerivation rec {
postInstall = lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
mkdir "$out"/Applications mkdir "$out"/Applications
mv app/mindforger.app "$out"/Applications/ mv app/mindforger.app "$out"/Applications/
wrapQtApp "$out"/Applications/mindforger.app/Contents/MacOS/mindforger
''; '';
meta = with lib; { meta = with lib; {

View file

@ -76,9 +76,6 @@ mkDerivation rec {
postInstall = with stdenv; lib.optionalString isDarwin '' postInstall = with stdenv; lib.optionalString isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications
mv $out/Mapper.app $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 mkdir -p $out/bin
ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper ln -s $out/Applications/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
''; '';

View file

@ -65,8 +65,6 @@ mkDerivation rec {
mv $out/bin/*.app $out/Applications mv $out/bin/*.app $out/Applications
rmdir $out/bin || true rmdir $out/bin || true
wrapQtApp "$out"/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
mv --target-directory=$out/Applications/OpenSCAD.app/Contents/Resources \ mv --target-directory=$out/Applications/OpenSCAD.app/Contents/Resources \
$out/share/openscad/{examples,color-schemes,locale,libraries,fonts,templates} $out/share/openscad/{examples,color-schemes,locale,libraries,fonts,templates}

View file

@ -56,7 +56,6 @@ mkDerivation rec {
postInstall = lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications
mv GoldenDict.app $out/Applications mv GoldenDict.app $out/Applications
wrapQtApp $out/Applications/GoldenDict.app/Contents/MacOS/GoldenDict
''; '';
meta = with lib; { meta = with lib; {

View file

@ -28,7 +28,6 @@ mkDerivation rec {
postInstall = lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications
mv GPXLab/GPXLab.app $out/Applications mv GPXLab/GPXLab.app $out/Applications
wrapQtApp $out/Applications/GPXLab.app/Contents/MacOS/GPXLab
''; '';
meta = with lib; { meta = with lib; {

View file

@ -26,7 +26,6 @@ mkDerivation rec {
postInstall = with stdenv; lib.optionalString isDarwin '' postInstall = with stdenv; lib.optionalString isDarwin ''
mkdir -p $out/Applications mkdir -p $out/Applications
mv GPXSee.app $out/Applications mv GPXSee.app $out/Applications
wrapQtApp $out/Applications/GPXSee.app/Contents/MacOS/GPXSee
''; '';
meta = with lib; { meta = with lib; {

View file

@ -115,11 +115,6 @@ stdenv.mkDerivation rec {
++ optional (stdenv.isDarwin && withKeePassTouchID) ++ optional (stdenv.isDarwin && withKeePassTouchID)
darwin.apple_sdk.frameworks.LocalAuthentication; 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; passthru.tests = nixosTests.keepassxc;
meta = { meta = {

View file

@ -30,9 +30,6 @@ mkDerivation rec {
installPhase = '' installPhase = ''
install -Dm755 console/lsd2dsl gui/lsd2dsl-qtgui -t $out/bin 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; { meta = with lib; {

View file

@ -50,7 +50,6 @@ mkDerivation rec {
mkdir -p $out/Applications mkdir -p $out/Applications
mv binaries/bin/merkaartor.app $out/Applications mv binaries/bin/merkaartor.app $out/Applications
mv binaries/bin/plugins $out/Applications/merkaartor.app/Contents mv binaries/bin/plugins $out/Applications/merkaartor.app/Contents
wrapQtApp $out/Applications/merkaartor.app/Contents/MacOS/merkaartor
''; '';
meta = with lib; { meta = with lib; {

View file

@ -33,10 +33,6 @@ in mkDerivation {
cp sleepyhead/SleepyHead $out/bin cp sleepyhead/SleepyHead $out/bin
''; '';
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out/Applications/SleepyHead.app/Contents/MacOS/SleepyHead"
'';
meta = with lib; { meta = with lib; {
homepage = "https://sleepyhead.jedimark.net/"; homepage = "https://sleepyhead.jedimark.net/";
description = "Review and explore data produced by CPAP and related machines"; description = "Review and explore data produced by CPAP and related machines";

View file

@ -51,11 +51,6 @@ stdenv.mkDerivation rec {
install -Dm644 $src/xpdf-qt/xpdf-icon.svg $out/share/pixmaps/xpdf.svg 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; { meta = with lib; {
homepage = "https://www.xpdfreader.com"; homepage = "https://www.xpdfreader.com";
description = "Viewer for Portable Document Format (PDF) files"; description = "Viewer for Portable Document Format (PDF) files";

View file

@ -16,9 +16,6 @@ mkDerivation rec {
mkdir -p "$out/Applications" mkdir -p "$out/Applications"
mv bin/chatterino.app "$out/Applications/" mv bin/chatterino.app "$out/Applications/"
''; '';
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out/Applications/chatterino.app/Contents/MacOS/chatterino"
'';
meta = with lib; { meta = with lib; {
description = "A chat client for Twitch chat"; description = "A chat client for Twitch chat";
longDescription = '' longDescription = ''

View file

@ -34,7 +34,6 @@ mkDerivation rec {
mkdir -p $out/Applications mkdir -p $out/Applications
cp -r tensor.app $out/Applications/tensor.app cp -r tensor.app $out/Applications/tensor.app
wrapQtApp $out/Applications/tensor.app/Contents/MacOS/tensor
runHook postInstall runHook postInstall
'' else '' '' else ''

View file

@ -38,8 +38,6 @@ stdenv.mkDerivation rec {
install_name_tool \ install_name_tool \
-add_rpath @executable_path/../Frameworks \ -add_rpath @executable_path/../Frameworks \
$out/Applications/Communi.app/Contents/MacOS/Communi $out/Applications/Communi.app/Contents/MacOS/Communi
wrapQtApp $out/Applications/Communi.app/Contents/MacOS/Communi
'' else '' '' else ''
substituteInPlace "$out/share/applications/communi.desktop" \ substituteInPlace "$out/share/applications/communi.desktop" \
--replace "/usr/bin" "$out/bin" --replace "/usr/bin" "$out/bin"

View file

@ -66,8 +66,6 @@ in stdenv.mkDerivation {
install_name_tool -change "$dylib" "$out/lib/$dylib" "$f" install_name_tool -change "$dylib" "$out/lib/$dylib" "$f"
done done
done done
wrapQtApp $out/Applications/Wireshark.app/Contents/MacOS/Wireshark
'' else optionalString withQt '' '' else optionalString withQt ''
install -Dm644 -t $out/share/applications ../wireshark.desktop install -Dm644 -t $out/share/applications ../wireshark.desktop

View file

@ -37,10 +37,6 @@ stdenv.mkDerivation rec {
done done
''; '';
postInstall = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out"/bin/beamerpresenter.app/Contents/MacOS/beamerpresenter
'';
meta = with lib; { meta = with lib; {
description = "Modular multi screen pdf presentation software respecting your window manager"; description = "Modular multi screen pdf presentation software respecting your window manager";
homepage = "https://github.com/stiglers-eponym/BeamerPresenter"; homepage = "https://github.com/stiglers-eponym/BeamerPresenter";

View file

@ -28,10 +28,6 @@ mkDerivation rec {
'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")' 'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Stellarium.app/Contents")'
''; '';
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out"/Stellarium.app/Contents/MacOS/stellarium
'';
meta = with lib; { meta = with lib; {
description = "Free open-source planetarium"; description = "Free open-source planetarium";
homepage = "http://stellarium.org/"; homepage = "http://stellarium.org/";

View file

@ -94,9 +94,6 @@ mkDerivation rec {
mv $out/Resources/* "$out/Applications/Jellyfin Media Player.app/Contents/Resources/" mv $out/Resources/* "$out/Applications/Jellyfin Media Player.app/Contents/Resources/"
rmdir $out/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 ln -s "$out/Applications/Jellyfin Media Player.app/Contents/MacOS/Jellyfin Media Player" $out/bin/jellyfinmediaplayer
''; '';

View file

@ -36,8 +36,6 @@ mkDerivation {
-change libfive.dylib $out/lib/libfive.dylib \ -change libfive.dylib $out/lib/libfive.dylib \
-change libfive-guile.dylib $out/lib/libfive-guile.dylib \ -change libfive-guile.dylib $out/lib/libfive-guile.dylib \
$out/Applications/Studio.app/Contents/MacOS/Studio $out/Applications/Studio.app/Contents/MacOS/Studio
wrapQtApp $out/Applications/Studio.app/Contents/MacOS/Studio
'' else '' '' else ''
# Link "Studio" binary to "libfive-studio" to be more obvious: # Link "Studio" binary to "libfive-studio" to be more obvious:
ln -s "$out/bin/Studio" "$out/bin/libfive-studio" ln -s "$out/bin/Studio" "$out/bin/libfive-studio"

View file

@ -53,7 +53,6 @@ mkDerivation rec {
mv "${binname}.app" $out/Applications/ mv "${binname}.app" $out/Applications/
install_name_tool -change {,${qwt}/lib/}libqwt.6.dylib "$out/Applications/${binname}.app/Contents/MacOS/${binname}" 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} ln -s "$out/Applications/${binname}.app/Contents/MacOS/${binname}" $out/bin/${mainProgram}
''; '';

View file

@ -29,9 +29,6 @@ mkDerivation rec {
postInstall = lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
mkdir $out/Applications mkdir $out/Applications
mv $out/*.app $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; { meta = with lib; {

View file

@ -58,8 +58,6 @@ in
--prefix PATH : '${coreutils}/bin' \ --prefix PATH : '${coreutils}/bin' \
--prefix PATH : '${fontconfig.bin}/bin' \ --prefix PATH : '${fontconfig.bin}/bin' \
--run '. ${./set-gdfontpath-from-fontconfig.sh}' --run '. ${./set-gdfontpath-from-fontconfig.sh}'
'' + lib.optionalString (stdenv.isDarwin && withQt) ''
wrapQtApp $out/bin/gnuplot
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -25,7 +25,6 @@ mkDerivation rec {
mkdir -p $out/Applications mkdir -p $out/Applications
mv $out/bin/glogg.app $out/Applications/glogg.app mv $out/bin/glogg.app $out/Applications/glogg.app
rm -fr $out/{bin,share} rm -fr $out/{bin,share}
wrapQtApp $out/Applications/glogg.app/Contents/MacOS/glogg
''; '';
meta = with lib; { meta = with lib; {