wrapQtAppsHook: Remove ad hoc Qt wrappers

This commit is contained in:
Thomas Tuegel 2019-07-05 10:42:08 -05:00
parent f79fd2e826
commit 51d78034a1
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
43 changed files with 179 additions and 288 deletions

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost, zeromq, rapidcheck
, zlib, miniupnpc, qtbase ? null, qttools ? null, utillinux, protobuf, python3, qrencode, libevent
, zlib, miniupnpc, qtbase ? null, qttools ? null, wrapQtAppsHook ? null, utillinux, protobuf, python3, qrencode, libevent
, withGui }:
with stdenv.lib;
@ -14,7 +14,9 @@ stdenv.mkDerivation rec{
sha256 = "5e4e6890e07b620a93fdb24605dae2bb53e8435b2a93d37558e1db1913df405f";
};
nativeBuildInputs = [ pkgconfig autoreconfHook ];
nativeBuildInputs =
[ pkgconfig autoreconfHook ]
++ optional withGui wrapQtAppsHook;
buildInputs = [ openssl db48 boost zlib zeromq
miniupnpc protobuf libevent]
++ optionals stdenv.isLinux [ utillinux ]
@ -34,10 +36,11 @@ stdenv.mkDerivation rec{
doCheck = true;
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
checkFlags = optionals withGui [ "QT_PLUGIN_PATH=${qtbase}/lib/qt-5.${versions.minor qtbase.version}/plugins" ]
++ [ "LC_ALL=C.UTF-8" ];
checkFlags =
[ "LC_ALL=C.UTF-8" ]
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
# See also https://github.com/NixOS/nixpkgs/issues/24256
++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
enableParallelBuilding = true;

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub
, makeWrapper, makeDesktopItem
, wrapQtAppsHook, makeDesktopItem
, qtbase, qmake, qtmultimedia, qttools
, qtgraphicaleffects, qtdeclarative
, qtlocation, qtquickcontrols, qtquickcontrols2
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
sha256 = "1l4kx2vidr7bpds43jdbwyaz0q1dy7sricpz061ff1fkappbxdh8";
};
nativeBuildInputs = [ qmake pkgconfig ];
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
buildInputs = [
qtbase qtmultimedia qtgraphicaleffects
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
qtwebchannel qtwebengine qtx11extras
qtxmlpatterns monero unbound readline
boost libunwind libsodium pcsclite zeromq
cppzmq makeWrapper hidapi
cppzmq hidapi
];
patches = [
@ -94,11 +94,6 @@ stdenv.mkDerivation rec {
cp $src/images/appicons/$size.png \
$out/share/icons/hicolor/$size/apps/monero.png
done;
# wrap runtime dependencies
wrapProgram $out/bin/monero-wallet-gui \
--set QML2_IMPORT_PATH "${qml2ImportPath}" \
--set QT_PLUGIN_PATH "${qtbase.bin}/${qtbase.qtPluginPrefix}"
'';
meta = {

View file

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, jack2,
liblo, libpulseaudio, libsndfile, pkgconfig, python3Packages,
which, withFrontend ? true,
withQt ? true, qtbase ? null,
withQt ? true, qtbase ? null, wrapQtAppsHook ? null,
withGtk2 ? true, gtk2 ? null,
withGtk3 ? true, gtk3 ? null }:
@ -9,6 +9,7 @@ with stdenv.lib;
assert withFrontend -> python3Packages ? pyqt5;
assert withQt -> qtbase != null;
assert withQt -> wrapQtAppsHook != null;
assert withGtk2 -> gtk2 != null;
assert withGtk3 -> gtk3 != null;
@ -23,7 +24,9 @@ stdenv.mkDerivation rec {
sha256 = "0fqgncqlr86n38yy7pa118mswfacmfczj7w9xx6c6k0jav3wk29k";
};
nativeBuildInputs = [ python3Packages.wrapPython pkgconfig which ];
nativeBuildInputs = [
python3Packages.wrapPython pkgconfig which wrapQtAppsHook
];
pythonPath = with python3Packages; [
rdflib pyliblo
@ -38,6 +41,7 @@ stdenv.mkDerivation rec {
installFlags = [ "PREFIX=$(out)" ];
dontWrapQtApps = true;
postFixup = ''
# Also sets program_PYTHONPATH and program_PATH variables
wrapPythonPrograms
@ -48,10 +52,9 @@ stdenv.mkDerivation rec {
patchPythonScript "$out/share/carla/carla_settings.py"
for program in $out/bin/*; do
wrapProgram "$program" \
wrapQtApp "$program" \
--prefix PATH : "$program_PATH:${which}/bin" \
--set PYTHONNOUSERSITE true \
--prefix QT_PLUGIN_PATH : "${qtbase.bin}/${qtbase.qtPluginPrefix}"
--set PYTHONNOUSERSITE true
done
'';

View file

@ -3,7 +3,7 @@
, chromaprint, docbook_xml_dtd_45, docbook_xsl, libxslt
, id3lib, taglib, mp4v2, flac, libogg, libvorbis
, zlib, readline , qtbase, qttools, qtmultimedia, qtquickcontrols
, makeWrapper
, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
@ -16,11 +16,12 @@ stdenv.mkDerivation rec {
sha256 = "0xkrsjrbr3z8cn8hjf623l28r3b755gr11i0clv8d8i3s10vhbd8";
};
nativeBuildInputs = [ wrapQtAppsHook ];
buildInputs = with stdenv.lib;
[ pkgconfig cmake python ffmpeg phonon automoc4
chromaprint docbook_xml_dtd_45 docbook_xsl libxslt
id3lib taglib mp4v2 flac libogg libvorbis zlib readline
qtbase qttools qtmultimedia qtquickcontrols makeWrapper ];
qtbase qttools qtmultimedia qtquickcontrols ];
cmakeFlags = [ "-DWITH_APPS=Qt;CLI" ];
NIX_LDFLAGS = "-lm -lpthread";
@ -29,10 +30,6 @@ stdenv.mkDerivation rec {
export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
'';
postInstall = ''
wrapProgram $out/bin/kid3-qt --prefix QT_PLUGIN_PATH : $out/lib/qt5/plugins
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {

View file

@ -43,6 +43,8 @@ mkDerivation rec {
"-DCLANG_BUILTIN_DIR=${llvmPackages.clang-unwrapped}/lib/clang/${(builtins.parseDrvName llvmPackages.clang.name).version}/include"
];
dontWrapQtApps = true;
postPatch = ''
# FIXME: temporary until https://invent.kde.org/kde/kdevelop/merge_requests/8 is merged
substituteInPlace kdevplatform/language/backgroundparser/parsejob.cpp --replace \
@ -55,8 +57,7 @@ mkDerivation rec {
wrapProgram "$out/bin/kdevelop!" \
--prefix PATH ":" "${lib.makeBinPath [ qttools kde-cli-tools ]}"
wrapProgram "$out/bin/kdevelop" \
--prefix QT_PLUGIN_PATH : $out/lib/qt-${qtVersion}/plugins
wrapQtApp "$out/bin/kdevelop"
# Fix the (now wrapped) kdevelop! to find things in right places:
# - Fixup the one use where KDEV_BASEDIR is assumed to contain kdevelop.

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, gdal, cmake, ninja, proj, clipper, zlib, qtbase, qttools
, qtlocation, qtsensors, doxygen, cups, makeWrapper, qtimageformats
, qtlocation, qtsensors, doxygen, cups, wrapQtAppsHook, qtimageformats
}:
stdenv.mkDerivation rec {
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gdal qtbase qttools qtlocation qtimageformats
qtsensors clipper zlib proj doxygen cups];
nativeBuildInputs = [ cmake makeWrapper ninja ];
nativeBuildInputs = [ cmake wrapQtAppsHook ninja ];
src = fetchFromGitHub {
owner = "OpenOrienteering";
@ -48,9 +48,7 @@ stdenv.mkDerivation rec {
stdenv.lib.optionalString stdenv.isDarwin ''
# Fixes "This application failed to start because it could not find or load the Qt
# platform plugin "cocoa"."
wrapProgram $out/Mapper.app/Contents/MacOS/Mapper \
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
--set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtimageformats}/${qtbase.qtPluginPrefix}
wrapQtApp $out/Mapper.app/Contents/MacOS/Mapper
mkdir -p $out/bin
ln -s $out/Mapper.app/Contents/MacOS/Mapper $out/bin/mapper
'';

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, fetchpatch
, pkgconfig, makeWrapper
, pkgconfig, wrapQtAppsHook
, poppler, qt5, gnuplot
}:
@ -36,9 +36,9 @@ stdenv.mkDerivation rec {
})
];
nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake wrapQtAppsHook ];
QT_PLUGIN_PATH = "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}";
nativeBuildInputs = [ pkgconfig qt5.qttools qt5.qmake makeWrapper ];
buildInputs = [ qt5.qtbase poppler ];
enableParallelBuilding = true;
@ -50,9 +50,5 @@ stdenv.mkDerivation rec {
"QCOLLECTIONGENERATORCOMMAND=qhelpgenerator"
];
postFixup = ''
wrapProgram "$out/bin/qtikz" \
--prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}" \
--prefix PATH : "${gnuplot}/bin"
'';
qtWrapperArgs = [ ''--prefix PATH : "${gnuplot}/bin"'' ];
}

View file

@ -37,11 +37,6 @@ mkDerivation rec {
rm "$out/lib"
'';
postInstall = ''
wrapProgram $out/bin/albert \
--prefix XDG_DATA_DIRS : $out/share
'';
meta = with lib; {
homepage = https://albertlauncher.github.io/;
description = "Desktop agnostic launcher";

View file

@ -1,4 +1,4 @@
{ lib, fetchurl, python3Packages, qtbase, makeWrapper }:
{ lib, fetchurl, python3Packages, qtbase, wrapQtAppsHook }:
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
@ -32,7 +32,7 @@ python3Packages.buildPythonApplication rec {
btchip
];
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ wrapQtAppsHook ];
postPatch = ''
substituteInPlace contrib/requirements/requirements.txt \
@ -54,10 +54,6 @@ python3Packages.buildPythonApplication rec {
postInstall = ''
substituteInPlace $out/share/applications/electron-cash.desktop \
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
# Please remove this when #44047 is fixed
wrapProgram $out/bin/electron-cash \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
'';
doInstallCheck = true;

View file

@ -17,6 +17,7 @@
, qtsvg
, qtx11extras
, quazip
, wrapQtAppsHook
, yubikey-personalization
, zlib
@ -73,12 +74,11 @@ stdenv.mkDerivation rec {
doCheck = true;
checkPhase = ''
export LC_ALL="en_US.UTF-8"
export QT_PLUGIN_PATH="${qtbase.bin}/${qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM=offscreen
make test ARGS+="-E testgui --output-on-failure"
'';
nativeBuildInputs = [ cmake makeWrapper qttools ];
nativeBuildInputs = [ cmake wrapQtAppsHook qttools ];
buildInputs = [
curl
@ -102,10 +102,9 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional withKeePassKeeShareSecure quazip
++ stdenv.lib.optional stdenv.isDarwin qtmacextras;
postInstall = optionalString stdenv.isDarwin ''
preFixup = optionalString stdenv.isDarwin ''
# Make it work without Qt in PATH.
wrapProgram $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC \
--set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}
wrapQtApp $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC
'';
meta = {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, makeWrapper }:
{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, wrapQtAppsHook }:
let
version = "5.4.10";
@ -11,17 +11,12 @@ in stdenv.mkDerivation {
sha256 = "1902ahb2g9xanrip1n0ihr31az8sv9fsvzddnzf70kbwlfclnqf7";
};
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ];
buildInputs = [ nss qtbase qtsvg sane-backends stdenv.cc.cc ];
dontStrip = true;
# Please remove this when #44047 is fixed
postInstall = ''
wrapProgram $out/bin/masterpdfeditor5 --prefix QT_PLUGIN_PATH : ${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
installPhase = ''
runHook preInstall

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, makeWrapper, pkgconfig, qmake
{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, cmake, wrapQtAppsHook, pkgconfig, qmake
, curl, grantlee, libgit2, libusb, libssh2, libxml2, libxslt, libzip, zlib
, qtbase, qtconnectivity, qtlocation, qtsvg, qttools, qtwebkit, libXcomposite
}:
@ -79,18 +79,13 @@ in stdenv.mkDerivation rec {
qtbase qtconnectivity qtsvg qttools qtwebkit
];
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
nativeBuildInputs = [ cmake wrapQtAppsHook pkgconfig ];
cmakeFlags = [
"-DLIBDC_FROM_PKGCONFIG=ON"
"-DNO_PRINTING=OFF"
];
postInstall = ''
wrapProgram $out/bin/subsurface \
--prefix QT_PLUGIN_PATH : "${googlemaps}/${googlemaps.pluginsSubdir}"
'';
enableParallelBuilding = true;
passthru = { inherit version libdc googlemaps; };

View file

@ -1,6 +1,6 @@
{ enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false
, stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null
, cmake, qtbase ? null, qtsvg ? null, makeWrapper
, cmake, qtbase ? null, qtsvg ? null, wrapQtAppsHook
}:
assert enableGUI -> qtbase != null && qtsvg != null && freetype != null;
@ -22,7 +22,9 @@ stdenv.mkDerivation {
# https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html
patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch;
nativeBuildInputs = [ cmake makeWrapper ];
nativeBuildInputs =
[ cmake ]
++ stdenv.lib.optional enableGUI wrapQtAppsHook;
cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"];
@ -36,11 +38,6 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableGUI) ''
wrapProgram $out/bin/xpdf \
--set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtsvg.bin}/${qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {
homepage = https://www.xpdfreader.com;
description = "Viewer for Portable Document Format (PDF) files";

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
];
enableParallelBuilding = true;
nativeBuildInputs = [ qt.qmake makeWrapper ];
nativeBuildInputs = [ qt.qmake qt.wrapQtAppsHook ];
buildInputs = [ qt.qtbase ];
qmakeFlags = [ "CONFIG-=app_bundle" ];
@ -29,11 +29,6 @@ stdenv.mkDerivation rec {
cp qtchan $out/bin
'';
preFixup = ''
wrapProgram $out/bin/qtchan \
--suffix QT_PLUGIN_PATH : ${qt.qtbase.bin}/${qt.qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {
description = "4chan browser in qt5";
homepage = "https://github.com/siavash119/qtchan";

View file

@ -1,7 +1,7 @@
{ stable, version, sha256Hash, archPatchesRevision, archPatchesHash }:
{ mkDerivation, lib, fetchFromGitHub, fetchsvn
, pkgconfig, pythonPackages, cmake, wrapGAppsHook, gcc8
, pkgconfig, pythonPackages, cmake, wrapGAppsHook, wrapQtAppsHook, gcc8
, qtbase, qtimageformats, gtk3, libappindicator-gtk3, libnotify, xdg_utils
, dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
}:
@ -39,7 +39,7 @@ mkDerivation rec {
--replace '"notify"' '"${libnotify}/lib/libnotify.so"'
'';
nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook gcc8 ];
nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook wrapQtAppsHook gcc8 ];
# We want to run wrapProgram manually (with additional parameters)
dontWrapGApps = true;
@ -129,12 +129,13 @@ mkDerivation rec {
done
'';
dontWrapQtApps = true;
postFixup = ''
# This is necessary to run Telegram in a pure environment.
# We also use gappsWrapperArgs from wrapGAppsHook.
wrapProgram $out/bin/telegram-desktop \
"''${gappsWrapperArgs[@]}" \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \
"''${qtWrapperArgs[@]}" \
--prefix PATH : ${xdg_utils}/bin \
--set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
sed -i $out/bin/telegram-desktop \

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, qtbase, qtsvg, qmake, pkgconfig, boost, wirelesstools, iw, qwt, makeWrapper }:
{ stdenv, fetchurl, qtbase, qtsvg, qmake, pkgconfig, boost, wirelesstools, iw, qwt, wrapQtAppsHook }:
stdenv.mkDerivation rec {
name = "linssid-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl";
};
nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
nativeBuildInputs = [ pkgconfig qmake wrapQtAppsHook ];
buildInputs = [ qtbase qtsvg boost qwt ];
patches = [ ./0001-unbundled-qwt.patch ];
@ -26,11 +26,8 @@ stdenv.mkDerivation rec {
rm -fr qwt-lib
'';
postInstall = ''
wrapProgram $out/bin/linssid \
--prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix} \
--prefix PATH : ${stdenv.lib.makeBinPath [ wirelesstools iw ]}
'';
qtWrapperArgs =
[ ''--prefix PATH : ${stdenv.lib.makeBinPath [ wirelesstools iw ]}'' ];
meta = with stdenv.lib; {
description = "Graphical wireless scanning for Linux";

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, makeWrapper, pkgconfig
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig
, qt4, qmake4Hook, qt5, avahi, boost, libopus, libsndfile, protobuf3_6, speex, libcap
, alsaLib, python
, jackSupport ? false, libjack2 ? null
@ -158,11 +158,6 @@ in {
murmur_git = (server gitSource).overrideAttrs (old: {
meta = old.meta // { broken = iceSupport; };
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ makeWrapper ];
installPhase = old.installPhase or "" + ''
wrapProgram $out/bin/murmurd --suffix QT_PLUGIN_PATH : \
${getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}
'';
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ qt5.wrapQtAppsHook ];
});
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qmake, pkgconfig, makeWrapper
{ stdenv, fetchFromGitHub, qmake, pkgconfig, wrapQtAppsHook
, qtbase, qttools, qtwebkit, sqlite
}:
@ -13,14 +13,9 @@ stdenv.mkDerivation rec {
sha256 = "0xav9qr8n6310636nfbgx4iix65fs3ya5rz2isxsf38bkjm7r3pa";
};
nativeBuildInputs = [ qmake pkgconfig makeWrapper ];
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
buildInputs = [ qtbase qttools qtwebkit sqlite.dev ];
postFixup = ''
wrapProgram $out/bin/quiterss \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
'';
meta = with stdenv.lib; {
description = "A Qt-based RSS/Atom news feed reader";
longDescription = ''

View file

@ -1,5 +1,5 @@
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret
, inotify-tools, wrapQtAppsHook, openssl_1_1, pcre, qtwebengine, libsecret
, libcloudproviders
}:
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
nativeBuildInputs = [ pkgconfig cmake wrapQtAppsHook ];
buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl_1_1.out pcre inotify-tools libcloudproviders ];
@ -31,13 +31,13 @@ stdenv.mkDerivation rec {
"-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
];
qtWrapperArgs = [
''--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]}''
];
postInstall = ''
sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
$out/share/applications/nextcloud.desktop
wrapProgram "$out/bin/nextcloud" \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]} \
--prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, full,
libsecret, libGL, libpulseaudio, glib, makeWrapper, makeDesktopItem }:
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtsvg, qtdeclarative, qttools, full
, libsecret, libGL, libpulseaudio, glib, wrapQtAppsHook, makeDesktopItem }:
let
version = "1.1.5-1";
@ -28,7 +28,7 @@ in stdenv.mkDerivation rec {
sha256 = "1y5mphrs60zd6km9z64vskk70q9zzw4g6js7qvgl572wv81w2l75";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ wrapQtAppsHook ];
sourceRoot = ".";
@ -60,18 +60,11 @@ in stdenv.mkDerivation rec {
libpulseaudio
glib
];
qtPath = prefix: "${full}/${prefix}";
in ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpath}" \
$out/lib/protonmail-bridge
wrapProgram $out/lib/protonmail-bridge \
--set QT_PLUGIN_PATH "${qtPath qtbase.qtPluginPrefix}" \
--set QML_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \
--set QML2_IMPORT_PATH "${qtPath qtbase.qtQmlPrefix}" \
'';
meta = with stdenv.lib; {

View file

@ -30,7 +30,7 @@ in stdenv.mkDerivation {
nativeBuildInputs = [
bison cmake extra-cmake-modules flex pkgconfig
];
] ++ optional withQt qt5.wrapQtAppsHook;
buildInputs = [
gettext pcre perl libpcap lua5 libssh nghttp2 openssl libgcrypt
@ -70,12 +70,9 @@ in stdenv.mkDerivation {
done
done
wrapProgram $out/Applications/Wireshark.app/Contents/MacOS/Wireshark \
--set QT_PLUGIN_PATH ${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}
wrapQtApp $out/Applications/Wireshark.app/Contents/MacOS/Wireshark
'' else optionalString withQt ''
install -Dm644 -t $out/share/applications ../wireshark.desktop
wrapProgram $out/bin/wireshark \
--set QT_PLUGIN_PATH ${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}
substituteInPlace $out/share/applications/*.desktop \
--replace "Exec=wireshark" "Exec=$out/bin/wireshark"

View file

@ -1,4 +1,5 @@
{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
, wrapQtAppsHook
, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
@ -29,6 +30,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
doxygen extra-cmake-modules graphviz kdoctools python2Packages.wrapPython
wrapQtAppsHook
];
buildInputs = [
@ -57,13 +59,11 @@ stdenv.mkDerivation rec {
doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
installCheckInputs = [ xvfb_run ];
installCheckPhase = let
pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
in lib.optionalString doInstallCheck ''
QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} \
installCheckPhase =
lib.optionalString doInstallCheck ''
xvfb-run -s '-screen 0 1024x768x24' make test \
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
'';
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
'';
meta = {
description = "Personal finance manager for KDE";

View file

@ -1,11 +1,11 @@
{ stdenv, fetchsvn, makeWrapper, pkgconfig, cmake, qtbase, cairo, pixman,
{ stdenv, fetchsvn, wrapQtAppsHook, pkgconfig, cmake, qtbase, cairo, pixman,
boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools }:
let
pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
revision = "22806";
in
in
stdenv.mkDerivation rec {
name = "scribus-unstable-${version}";
version = "2019-01-16";
@ -18,17 +18,13 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
nativeBuildInputs = [ wrapQtAppsHook ];
buildInputs = [
makeWrapper pkgconfig cmake qtbase cairo pixman boost cups fontconfig
pkgconfig cmake qtbase cairo pixman boost cups fontconfig
freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
poppler_data pythonEnv harfbuzz qtimageformats qttools
];
postFixup = ''
wrapProgram $out/bin/scribus \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
'';
meta = {
maintainers = [ stdenv.lib.maintainers.erictapen ];
platforms = stdenv.lib.platforms.linux;

View file

@ -1,32 +1,27 @@
{ mkDerivation, lib, fetchFromGitHub
, cmake, freetype, libpng, libGLU_combined, openssl, perl, libiconv
, qtscript, qtserialport, qttools
, qtmultimedia, qtlocation, makeWrapper, qtbase
, qtmultimedia, qtlocation, qtbase, wrapQtAppsHook
}:
mkDerivation rec {
name = "stellarium-${version}";
version = "0.19.0";
version = "0.19.1";
src = fetchFromGitHub {
owner = "Stellarium";
repo = "stellarium";
rev = "v${version}";
sha256 = "1x9s9v9ann93nyqd8n8adwhx66xgq5vp0liyzl1h1ji6qk8jla3c";
sha256 = "0hf1wv2bb5j7ny2xh29mj9m4hjblhn02zylay8gl85w7xlqs7s5r";
};
nativeBuildInputs = [ cmake perl ];
nativeBuildInputs = [ cmake perl wrapQtAppsHook ];
buildInputs = [
freetype libpng libGLU_combined openssl libiconv qtscript qtserialport qttools
qtmultimedia qtlocation qtbase makeWrapper
qtmultimedia qtlocation qtbase
];
postInstall = ''
wrapProgram $out/bin/stellarium \
--prefix QT_PLUGIN_PATH : "${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
'';
meta = with lib; {
description = "Free open-source planetarium";
homepage = http://stellarium.org/;

View file

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake,
libzip, boost, fftw, qtbase,
libusb, makeWrapper, libsigrok4dsl, libsigrokdecode4dsl
libusb, wrapQtAppsHook, libsigrok4dsl, libsigrokdecode4dsl
}:
stdenv.mkDerivation rec {
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
./install.patch
];
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
buildInputs = [
boost fftw qtbase libusb libzip libsigrokdecode4dsl libsigrok4dsl
@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
postFixup = ''
wrapProgram $out/bin/DSView --suffix QT_PLUGIN_PATH : \
${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {
description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
homepage = https://www.dreamsourcelab.com/;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl, xkeyboard_config, makeWrapper }:
{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl, xkeyboard_config, wrapQtAppsHook }:
stdenv.mkDerivation rec {
name = "p4v-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
dontBuild = true;
nativeBuildInputs = [makeWrapper];
nativeBuildInputs = [ wrapQtAppsHook ];
ldLibraryPath = lib.makeLibraryPath [
stdenv.cc.cc.lib
@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
openssl
];
dontWrapQtApps = true;
installPhase = ''
mkdir $out
cp -r bin $out
@ -31,10 +32,9 @@ stdenv.mkDerivation rec {
for f in $out/bin/*.bin ; do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f
wrapProgram $f \
wrapQtApp $f \
--suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
--suffix QT_XKB_CONFIG_ROOT : ${xkeyboard_config}/share/X11/xkb \
--suffix QT_PLUGIN_PATH : ${qtbase.bin}/${qtbase.qtPluginPrefix}
--suffix QT_XKB_CONFIG_ROOT : ${xkeyboard_config}/share/X11/xkb
done
'';

View file

@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, cmake, pkgconfig
, zlib, gettext, libvdpau, libva, libXv, sqlite
, yasm, freetype, fontconfig, fribidi
, makeWrapper, libXext, libGLU, qttools, qtbase
, makeWrapper, libXext, libGLU, qttools, qtbase, wrapQtAppsHook
, alsaLib
, withX265 ? true, x265
, withX264 ? true, x264
@ -37,7 +37,9 @@ stdenv.mkDerivation rec {
./bootstrap_logging.patch
];
nativeBuildInputs = [ yasm cmake pkgconfig ];
nativeBuildInputs =
[ yasm cmake pkgconfig ]
++ lib.optional withQT wrapQtAppsHook;
buildInputs = [
zlib gettext libvdpau libva libXv sqlite fribidi fontconfig
freetype alsaLib libXext libGLU makeWrapper
@ -55,7 +57,10 @@ stdenv.mkDerivation rec {
buildCommand = let
qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
wrapProgram = f: "wrapProgram ${f} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
wrapWith = makeWrapper: filename:
"${makeWrapper} ${filename} --set ADM_ROOT_DIR $out --prefix LD_LIBRARY_PATH : ${libXext}/lib";
wrapQtApp = wrapWith "wrapQtApp";
wrapProgram = wrapWith "wrapProgram";
in ''
unpackPhase
cd "$sourceRoot"
@ -74,8 +79,8 @@ stdenv.mkDerivation rec {
${wrapProgram "$out/bin/avidemux3_cli"}
${stdenv.lib.optionalString withQT ''
${wrapProgram "$out/bin/avidemux3_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
${wrapProgram "$out/bin/avidemux3_jobs_qt5"} --prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
${wrapQtApp "$out/bin/avidemux3_qt5"}
${wrapQtApp "$out/bin/avidemux3_jobs_qt5"}
''}
ln -s "$out/bin/avidemux3_${default}" "$out/bin/avidemux"

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeWrapper, phonon, phonon-backend-vlc, qtbase, qmake
{ stdenv, fetchFromGitHub, wrapQtAppsHook, phonon, phonon-backend-vlc, qtbase, qmake
, qtdeclarative, qttools
# "Free" key generated by nckx <github@tobias.gr>. I no longer have a Google
@ -17,17 +17,12 @@ stdenv.mkDerivation rec {
};
buildInputs = [ phonon phonon-backend-vlc qtbase qtdeclarative qttools ];
nativeBuildInputs = [ makeWrapper qmake ];
nativeBuildInputs = [ wrapQtAppsHook qmake ];
qmakeFlags = [ "DEFINES+=APP_GOOGLE_API_KEY=${withAPIKey}" ];
enableParallelBuilding = true;
postInstall = ''
wrapProgram $out/bin/minitube \
--prefix QT_PLUGIN_PATH : "${phonon-backend-vlc}/lib/qt-5.${stdenv.lib.versions.minor qtbase.version}/plugins"
'';
meta = with stdenv.lib; {
description = "Stand-alone YouTube video player";
longDescription = ''

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper
{ stdenv, fetchFromGitHub, cmake
, boost, python3, eigen
, icestorm, trellis
@ -6,7 +6,7 @@
# laptop (and over a remote X server on my server...), so mark it broken for
# now, with intent to fix later.
, enableGui ? false
, qtbase
, qtbase, wrapQtAppsHook
}:
let
@ -36,7 +36,9 @@ stdenv.mkDerivation rec {
sha256 = "1y14jpa948cwk0i19bsfqh7yxsxkgskm4xym4z179sjcvcdvrn3a";
};
nativeBuildInputs = [ cmake makeWrapper ];
nativeBuildInputs
= [ cmake ]
++ (stdenv.lib.optional enableGui wrapQtAppsHook);
buildInputs
= [ boostPython python3 eigen ]
++ (stdenv.lib.optional enableGui qtbase);
@ -56,13 +58,6 @@ stdenv.mkDerivation rec {
--replace 'git log -1 --format=%h' 'echo ${substring 0 11 src.rev}'
'';
postInstall = stdenv.lib.optionalString enableGui ''
for x in generic ice40 ecp5; do
wrapProgram $out/bin/nextpnr-$x \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
done
'';
meta = with stdenv.lib; {
description = "Place and route tool for FPGAs";
homepage = https://github.com/yosyshq/nextpnr;

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, makeWrapper
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, wrapQtAppsHook
, qtbase, libuuid, libcap, uwsgi, grantlee, pcre
}:
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "09cgfpr2k1jp98h1ahxqm5lmv3qbk0bcxpqpill6n5wmq2c8kl8b";
};
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
buildInputs = [ qtbase libuuid libcap uwsgi grantlee pcre ];
cmakeFlags = [
@ -31,12 +31,6 @@ stdenv.mkDerivation rec {
unset LD_LIBRARY_PATH
'';
postInstall = ''
for prog in $out/bin/*; do
wrapProgram "$prog" --set QT_PLUGIN_PATH '${qtbase}/${qtbase.qtPluginPrefix}'
done
'';
meta = with lib; {
description = "C++ Web Framework built on top of Qt";
homepage = https://cutelyst.org/;

View file

@ -1,4 +1,7 @@
{ stdenv, fetchbzr, pkgconfig, qmake, qtbase, qtdeclarative, glib, gobject-introspection }:
{ stdenv, fetchbzr, pkgconfig
, qmake, qtbase, qtdeclarative, wrapQtAppsHook
, glib, gobject-introspection
}:
stdenv.mkDerivation rec {
name = "gsettings-qt-${version}";
@ -14,6 +17,7 @@ stdenv.mkDerivation rec {
pkgconfig
qmake
gobject-introspection
wrapQtAppsHook
];
buildInputs = [

View file

@ -1,4 +1,4 @@
{ lib, runCommand, R, rstudio, makeWrapper, recommendedPackages, packages, qtbase }:
{ lib, runCommand, R, rstudio, wrapQtAppsHook, recommendedPackages, packages, qtbase }:
let
qtVersion = with lib.versions; "${major qtbase.version}.${minor qtbase.version}";
@ -7,7 +7,8 @@ runCommand (rstudio.name + "-wrapper") {
preferLocalBuild = true;
allowSubstitutes = false;
nativeBuildInputs = [makeWrapper];
nativeBuildInputs = [wrapQtAppsHook];
dontWrapQtApps = true;
buildInputs = [R rstudio] ++ recommendedPackages ++ packages;
@ -29,6 +30,6 @@ echo -n ".libPaths(c(.libPaths(), \"" >> $out/$fixLibsR
echo -n $R_LIBS_SITE | sed -e 's/:/", "/g' >> $out/$fixLibsR
echo -n "\"))" >> $out/$fixLibsR
echo >> $out/$fixLibsR
makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio --set R_PROFILE_USER $out/$fixLibsR \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
makeQtWrapper ${rstudio}/bin/rstudio $out/bin/rstudio \
--set R_PROFILE_USER $out/$fixLibsR
''

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgs, makeWrapper, lib }:
{ stdenv, fetchurl, pkgs, lib }:
stdenv.mkDerivation rec {
pname = "hopper";
@ -16,22 +16,20 @@ stdenv.mkDerivation rec {
libbsd.out libffi.out gmpxx.out python27Full.out python27Packages.libxml2 qt5.qtbase zlib xlibs.libX11.out xorg_sys_opengl.out xlibs.libXrender.out gcc-unwrapped.lib
];
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
qtWrapperArgs = [ ''--suffix LD_LIBRARY_PATH : ${ldLibraryPath}'' ];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/lib
mkdir -p $out/share
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
cp -r $sourceRoot/usr/share $out/share
mkdir -p $out/bin
mkdir -p $out/lib
mkdir -p $out/share
cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
cp -r $sourceRoot/opt/hopper-${rev}/lib $out
cp -r $sourceRoot/usr/share $out/share
patchelf \
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
$out/bin/hopper
# Details: https://nixos.wiki/wiki/Qt
wrapProgram $out/bin/hopper \
--suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
--suffix QT_PLUGIN_PATH : ${pkgs.qt5.qtbase}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
$out/bin/hopper
'';
meta = {

View file

@ -10,7 +10,7 @@ let
revision = "1";
# Fetch clang from qt vendor, this contains submodules like this:
# clang<-clang-tools-extra<-clazy.
# clang<-clang-tools-extra<-clazy.
clang_qt_vendor = llvmPackages_8.clang-unwrapped.overrideAttrs (oldAttrs: rec {
src = fetchgit {
url = "https://code.qt.io/clang/clang.git";
@ -32,15 +32,15 @@ stdenv.mkDerivation rec {
buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative llvmPackages_8.libclang clang_qt_vendor llvmPackages_8.llvm ];
nativeBuildInputs = [ qmake makeWrapper ];
nativeBuildInputs = [ qmake ];
# 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to
# 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to
# find clang libc++ library include paths. By default it's not covering paths
# like libc++-version, which is default name for libc++ folder in nixos.
patches = [ ./0001-Fix-clang-libcpp-regexp.patch
patches = [ ./0001-Fix-clang-libcpp-regexp.patch
# Fix clazy plugin name. This plugin was renamed with clang8
# release, and patch didn't make it into 4.9.1 release. Should be removed
# Fix clazy plugin name. This plugin was renamed with clang8
# release, and patch didn't make it into 4.9.1 release. Should be removed
# on qtcreator update, if this problem is fixed.
(fetchpatch {
url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangtools/clangtidyclazyrunner.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82";
sha256 = "1rl0rc2l297lpfhhawvkkmj77zb081hhp0bbi7nnykf3q9ch0clh";
})
];
];
doCheck = true;
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
--replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \
--replace '$$clean_path($${LLVM_BINDIR})' '${clang_qt_vendor}/bin'
# Fix include path to find clang and clang-c include directories.
# Fix include path to find clang and clang-c include directories.
substituteInPlace src/plugins/clangtools/clangtools.pro \
--replace 'INCLUDEPATH += $$LLVM_INCLUDEPATH' 'INCLUDEPATH += $$LLVM_INCLUDEPATH ${clang_qt_vendor}'

View file

@ -53,10 +53,9 @@ in mkDerivation rec {
NIX_CFLAGS_COMPILE = [ "-L${mysql.connector-c}/lib/mysql" "-I${mysql.connector-c}/include/mysql" ];
postFixup = ''
wrapProgram $out/bin/tora \
--prefix PATH : ${lib.getBin graphviz}/bin
'';
qtWrapperArgs = [
''--prefix PATH : ${lib.getBin graphviz}/bin''
];
meta = with lib; {
description = "Tora SQL tool";

View file

@ -32,9 +32,6 @@ stdenv.mkDerivation rec {
cp -pr release/chessx "$out/bin"
cp -pr unix/chessx.desktop "$out/share/applications"
wrapProgram $out/bin/chessx \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
runHook postInstall
'';

View file

@ -62,13 +62,12 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -p "$out/share/applications/"
cp "${desktopItem}"/share/applications/* "$out/share/applications/" #*/
for f in $out/bin/* #*/
do
wrapProgram $f --set FG_ROOT "${data}/share/FlightGear"
done
'';
qtWrapperArgs = [
''--set FG_ROOT "${data}/share/FlightGear"''
];
enableParallelBuilding = true;
meta = with stdenv.lib; {

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, coreutils, ncurses, gzip, flex, bison
, less, makeWrapper
, less
, buildPackages
, x11Mode ? false, qtMode ? false, libXaw, libXext, libXpm, bdftopcf, mkfontdir, pkgconfig, qt5
}:
@ -37,7 +37,7 @@ in stdenv.mkDerivation rec {
++ lib.optionals x11Mode [ mkfontdir bdftopcf ]
++ lib.optionals qtMode [
pkgconfig mkfontdir qt5.qtbase.dev
qt5.qtmultimedia.dev makeWrapper
qt5.qtmultimedia.dev qt5.wrapQtAppsHook
bdftopcf
];
@ -97,6 +97,10 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
preFixup = ''
wrapQtApp "$out/games/nethack"
'';
postInstall = ''
mkdir -p $out/games/lib/nethackuserdir
for i in xlogfile logfile perm record save; do
@ -137,11 +141,6 @@ in stdenv.mkDerivation rec {
${lib.optionalString (!(x11Mode || qtMode)) "install -Dm 555 util/dlb -t $out/libexec/nethack/"}
'';
postFixup = lib.optionalString qtMode ''
wrapProgram $out/bin/nethack-qt \
--prefix QT_PLUGIN_PATH : "${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}"
'';
meta = with stdenv.lib; {
description = "Rogue-like game";
homepage = http://nethack.org/;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, pkgconfig
{ stdenv, fetchFromGitHub, makeDesktopItem, wrapQtAppsHook, pkgconfig
, cmake, epoxy, libzip, ffmpeg, imagemagick, SDL2, qtbase, qtmultimedia, libedit
, qttools, minizip }:
@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
};
enableParallelBuilding = true;
nativeBuildInputs = [ makeWrapper pkgconfig cmake ];
nativeBuildInputs = [ wrapQtAppsHook pkgconfig cmake ];
buildInputs = [
libzip epoxy ffmpeg imagemagick SDL2 qtbase qtmultimedia libedit minizip
@ -34,8 +34,6 @@ in stdenv.mkDerivation rec {
postInstall = ''
cp -r ${desktopItem}/share/applications $out/share
wrapProgram $out/bin/mgba-qt --suffix QT_PLUGIN_PATH : \
${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
meta = with stdenv.lib; {

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, substituteAll, libGLU, makeWrapper }:
{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, substituteAll, libGLU, wrapQtAppsHook }:
stdenv.mkDerivation rec {
name = "nifskope-${version}";
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
})
];
buildInputs = [ qtbase qttools libGLU.dev makeWrapper ];
nativeBuildInputs = [ qmake ];
buildInputs = [ qtbase qttools libGLU.dev ];
nativeBuildInputs = [ qmake wrapQtAppsHook ];
preConfigure = ''
shopt -s globstar
@ -33,9 +33,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# Inspired by install/linux-install/nifskope.spec.in.
installPhase = let
qtVersion = "5.${stdenv.lib.versions.minor qtbase.version}";
in ''
installPhase = ''
runHook preInstall
d=$out/share/nifskope
@ -53,8 +51,6 @@ stdenv.mkDerivation rec {
find $out/share -type f -exec chmod -x {} \;
wrapProgram $out/bin/NifSkope --prefix QT_PLUGIN_PATH : "${qtbase}/lib/qt-${qtVersion}/plugins"
runHook postInstall
'';

View file

@ -1,7 +1,7 @@
{ mkDerivation, fetchurl, lib
, extra-cmake-modules, kdoctools, wrapGAppsHook
, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
, kconfig, kcrash, kinit, kpmcore
, eject, libatasmart , utillinux, makeWrapper, qtbase
, eject, libatasmart , utillinux, qtbase
}:
let
@ -17,16 +17,12 @@ in mkDerivation rec {
enableParallelBuilding = true;
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook makeWrapper ];
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook ];
# refer to kpmcore for the use of eject
buildInputs = [ eject libatasmart utillinux ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
postInstall = ''
wrapProgram "$out/bin/partitionmanager" --prefix QT_PLUGIN_PATH : "${kpmcore}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins"
'';
meta = with lib; {
description = "KDE Partition Manager";
license = licenses.gpl2;

View file

@ -1,6 +1,6 @@
{ stdenv
, fetchurl
, makeWrapper
, wrapQtAppsHook
, pcsclite
, pyotherside
, pythonPackages
@ -16,16 +16,9 @@
, yubikey-personalization
}:
let
qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
let inherit (stdenv) lib; in
inherit (stdenv) lib;
qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
qtbase.bin qtdeclarative.bin pyotherside qtquickcontrols qtquickcontrols2.bin qtgraphicaleffects
];
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "yubikey-manager-qt";
version = "1.1.1";
@ -34,7 +27,7 @@ in stdenv.mkDerivation rec {
sha256 = "0hcfl0mh4gqy9c8ghmi58asqr8v009n6li0mgcy3r8fyjr7qryvy";
};
nativeBuildInputs = [ makeWrapper python3.pkgs.wrapPython qmake ];
nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
postPatch = ''
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
@ -46,22 +39,20 @@ in stdenv.mkDerivation rec {
pythonPath = [ yubikey-manager ];
dontWrapQtApps = true;
postInstall = ''
buildPythonPath "$pythonPath"
wrapProgram $out/bin/ykman-gui \
wrapQtApp $out/bin/ykman-gui \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
--prefix PYTHONPATH : "$program_PYTHONPATH" \
--set QML2_IMPORT_PATH "${qml2ImportPath}" \
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
--prefix QT_PLUGIN_PATH : "${qtsvg.bin}/${qtbase.qtPluginPrefix}"
--prefix PYTHONPATH : "$program_PYTHONPATH"
mkdir -p $out/share/applications
cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
mkdir -p $out/share/ykman-gui/icons
cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
substituteInPlace $out/share/applications/ykman-gui.desktop \
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
mkdir -p $out/share/applications
cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
mkdir -p $out/share/ykman-gui/icons
cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
substituteInPlace $out/share/applications/ykman-gui.desktop \
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
'';
meta = with lib; {

View file

@ -1,5 +1,5 @@
{ stdenv, makeWrapper, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkgconfig
, qtbase, qttranslations, qtsvg }:
{ stdenv, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkgconfig
, qtbase, qttranslations, qtsvg, wrapQtAppsHook }:
stdenv.mkDerivation rec {
name = "nitrokey-app-${version}";
@ -29,15 +29,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
pkgconfig
makeWrapper
wrapQtAppsHook
];
cmakeFlags = "-DCMAKE_BUILD_TYPE=Release";
postFixup = ''
wrapProgram $out/bin/nitrokey-app \
--prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
'';
meta = with stdenv.lib; {
description = "Provides extra functionality for the Nitrokey Pro and Storage";
longDescription = ''