diff --git a/doc/languages-frameworks/qt.xml b/doc/languages-frameworks/qt.xml index b6c8f0e899e..1dbbb5341ba 100644 --- a/doc/languages-frameworks/qt.xml +++ b/doc/languages-frameworks/qt.xml @@ -2,31 +2,55 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-language-qt"> -Qt and KDE +Qt -Qt is a comprehensive desktop and mobile application development toolkit for C++. Legacy support is available for Qt 3 and Qt 4, but all current development uses Qt 5. The Qt 5 packages in Nixpkgs are updated frequently to take advantage of new features, but older versions are typically retained to support packages that may not be compatible with the latest version. When packaging applications and libraries for Nixpkgs, it is important to ensure that compatible versions of Qt 5 are used throughout; this consideration motivates the tools described below. + +Qt is a comprehensive desktop and mobile application development toolkit for C++. +Legacy support is available for Qt 3 and Qt 4, but all current development uses Qt 5. +The Qt 5 packages in Nixpkgs are updated frequently to take advantage of new features, +but older versions are typically retained until their support window ends. +The most important consideration in packaging Qt-based software is ensuring that each package and all its dependencies use the same version of Qt 5; +this consideration motivates most of the tools described below. + -
Libraries +
Packaging Libraries for Nixpkgs -Libraries that depend on Qt 5 should be built with each available version to avoid linking a dependent package against incompatible versions of Qt 5. (Although Qt 5 maintains backward ABI compatibility, linking against multiple versions at once is generally not possible; at best it will lead to runtime faults.) Packages that provide libraries should be added to the top-level function mkLibsForQt5, which is used to build a set of libraries for every Qt 5 version. The callPackage provided in this scope will ensure that only one Qt version will be used throughout the dependency tree. Dependencies should be imported unqualified, i.e. qtbase not qt5.qtbase, so that callPackage can do its work. Do not import a package set such as qt5 or libsForQt5 into your package; although it may work fine in the moment, it could well break at the next Qt update. + +Whenever possible, libraries that use Qt 5 should be built with each available version. +Packages providing libraries should be added to the top-level function mkLibsForQt5, +which is used to build a set of libraries for every Qt 5 version. +A special callPackage function is used in this scope to ensure that the entire dependency tree uses the same Qt 5 version. +Import dependencies unqualified, i.e., qtbase not qt5.qtbase. +Do not import a package set such as qt5 or libsForQt5. + -If a library does not support a particular version of Qt 5, it is best to mark it as broken by setting its meta.broken attribute. A package may be marked broken for certain versions by testing the qtbase.version attribute, which will always give the current Qt 5 version. + +If a library does not support a particular version of Qt 5, it is best to mark it as broken by setting its meta.broken attribute. +A package may be marked broken for certain versions by testing the qtbase.version attribute, which will always give the current Qt 5 version. +
-
Applications +
Packaging Applications for Nixpkgs -Applications generally do not need to be built with every Qt version because they do not provide any libraries for dependent packages to link against. The primary consideration is merely ensuring that the application itself and its dependencies are linked against only one version of Qt. To call your application expression, use libsForQt5.callPackage instead of callPackage. Dependencies should be imported unqualified, i.e. qtbase not qt5.qtbase. Do not import a package set such as qt5 or libsForQt5 into your package; although it may work fine in the moment, it could well break at the next Qt update. + +Call your application expression using libsForQt5.callPackage instead of callPackage. +Import dependencies unqualified, i.e., qtbase not qt5.qtbase. +Do not import a package set such as qt5 or libsForQt5. + -It is generally best to build an application package against the libsForQt5 library set. In case a package does not build with the latest Qt version, it is possible to pick a set pinned to a particular version, e.g. libsForQt55 for Qt 5.5, if that is the latest version the package supports. + +Qt 5 maintains strict backward compatibility, so it is generally best to build an application package against the latest version using the libsForQt5 library set. +In case a package does not build with the latest Qt version, it is possible to pick a set pinned to a particular version, e.g. libsForQt55 for Qt 5.5, if that is the latest version the package supports. +If a package must be pinned to an older Qt version, be sure to file a bug upstream; +because Qt is strictly backwards-compatible, any incompatibility is by definition a bug in the application. + -Qt-based applications require that several paths be set at runtime. This is accomplished by wrapping the provided executables in a package with wrapQtProgram or makeQtWrapper during the postFixup phase. To use the wrapper generators, add makeQtWrapper to nativeBuildInputs. The wrapper generators support the same options as wrapProgram and makeWrapper respectively. It is usually only necessary to generate wrappers for programs intended to be invoked by the user. - -
- -
KDE - -The KDE Frameworks are a set of libraries for Qt 5 which form the basis of the Plasma desktop environment and the KDE Applications suite. Packaging a Frameworks-based library does not require any steps beyond those described above for general Qt-based libraries. Frameworks-based applications should not use makeQtWrapper; instead, use kdeWrapper to create the necessary wrappers: kdeWrapper { unwrapped = expr; targets = exes; }, where expr is the un-wrapped package expression and exes is a list of strings giving the relative paths to programs in the package which should be wrapped. + +When testing applications in Nixpkgs, it is a common practice to build the package with nix-build and run it using the created symbolic link. +This will not work with Qt applications, however, because they have many hard runtime requirements that can only be guaranteed if the package is actually installed. +To test a Qt application, install it with nix-env or run it inside nix-shell. +
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 2216104be31..f099117f477 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -7,7 +7,7 @@ let xcfg = config.services.xserver; cfg = xcfg.desktopManager.plasma5; - inherit (pkgs) kdeWrapper kdeApplications plasma5 libsForQt5 qt5 xorg; + inherit (pkgs) kdeApplications plasma5 libsForQt5 qt5 xorg; in @@ -30,24 +30,12 @@ in ''; }; - extraPackages = mkOption { - type = types.listOf types.package; - default = []; - description = '' - KDE packages that need to be installed system-wide. - ''; - }; - }; }; config = mkMerge [ - (mkIf (cfg.extraPackages != []) { - environment.systemPackages = [ (kdeWrapper cfg.extraPackages) ]; - }) - (mkIf (xcfg.enable && cfg.enable) { services.xserver.desktopManager.session = singleton { name = "plasma5"; @@ -64,8 +52,8 @@ in }; security.wrappers = { - kcheckpass.source = "${plasma5.plasma-workspace.out}/lib/libexec/kcheckpass"; - "start_kdeinit".source = "${pkgs.kinit.out}/lib/libexec/kf5/start_kdeinit"; + kcheckpass.source = "${lib.getBin plasma5.plasma-workspace}/lib/libexec/kcheckpass"; + "start_kdeinit".source = "${lib.getBin pkgs.kinit}/lib/libexec/kf5/start_kdeinit"; }; environment.systemPackages = with pkgs; with qt5; with libsForQt5; with plasma5; with kdeApplications; @@ -139,10 +127,14 @@ in plasma-workspace plasma-workspace-wallpapers + dolphin dolphin-plugins ffmpegthumbs kdegraphics-thumbnailers + khelpcenter kio-extras + konsole + oxygen print-manager breeze-icons @@ -163,16 +155,6 @@ in ++ lib.optional config.services.colord.enable colord-kde ++ lib.optionals config.services.samba.enable [ kdenetwork-filesharing pkgs.samba ]; - services.xserver.desktopManager.plasma5.extraPackages = - with kdeApplications; with plasma5; - [ - khelpcenter - oxygen - - dolphin - konsole - ]; - environment.pathsToLink = [ "/share" ]; environment.etc = singleton { @@ -183,7 +165,6 @@ in environment.variables = { # Enable GTK applications to load SVG icons GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"; - QT_PLUGIN_PATH = "/run/current-system/sw/lib/qt5/plugins"; }; fonts.fonts = with pkgs; [ noto-fonts hack-font ]; @@ -209,7 +190,6 @@ in services.xserver.displayManager.sddm = { theme = "breeze"; - package = pkgs.sddmPlasma5; }; security.pam.services.kde = { allowNullPassword = true; }; diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index 2eb7ddcb1ec..e6cc02e4d49 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -9,7 +9,7 @@ let cfg = dmcfg.sddm; xEnv = config.systemd.services."display-manager".environment; - sddm = cfg.package; + inherit (pkgs) sddm; xserverWrapper = pkgs.writeScript "xserver-wrapper" '' #!/bin/sh @@ -37,8 +37,8 @@ let [Theme] Current=${cfg.theme} - ThemeDir=${sddm}/share/sddm/themes - FacesDir=${sddm}/share/sddm/faces + ThemeDir=/run/current-system/sw/share/sddm/themes + FacesDir=/run/current-system/sw/share/sddm/faces [Users] MaximumUid=${toString config.ids.uids.nixbld} @@ -105,15 +105,6 @@ in ''; }; - package = mkOption { - type = types.package; - default = pkgs.sddm; - description = '' - The SDDM package to install. - The default package can be overridden to provide extra themes. - ''; - }; - autoNumlock = mkOption { type = types.bool; default = false; @@ -205,7 +196,15 @@ in services.xserver.displayManager.job = { logsXsession = true; - execCmd = "exec ${sddm}/bin/sddm"; + environment = { + # Load themes from system environment + QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix; + QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix; + + XDG_DATA_DIRS = "/run/current-system/sw/share"; + }; + + execCmd = "exec /run/current-system/sw/bin/sddm"; }; security.pam.services = { @@ -254,7 +253,8 @@ in users.extraGroups.sddm.gid = config.ids.gids.sddm; - services.dbus.packages = [ sddm.unwrapped ]; + environment.systemPackages = [ sddm ]; + services.dbus.packages = [ sddm ]; # To enable user switching, allow sddm to allocate TTYs/displays dynamically. services.xserver.tty = null; diff --git a/pkgs/applications/audio/audacious/qt-5.nix b/pkgs/applications/audio/audacious/qt-5.nix index 663e0eb0cc8..da143c7d946 100644 --- a/pkgs/applications/audio/audacious/qt-5.nix +++ b/pkgs/applications/audio/audacious/qt-5.nix @@ -1,6 +1,6 @@ { - stdenv, lib, fetchurl, - gettext, makeQtWrapper, pkgconfig, + mkDerivation, lib, fetchurl, + gettext, pkgconfig, qtbase, alsaLib, curl, faad2, ffmpeg, flac, fluidsynth, gdk_pixbuf, lame, libbs2b, libcddb, libcdio082, libcue, libjack2, libmad, libmcs, libmms, libmodplug, @@ -24,16 +24,14 @@ let }; in -stdenv.mkDerivation { +mkDerivation { inherit version; name = "audacious-qt5-${version}"; sourceFiles = lib.attrValues sources; sourceRoots = lib.attrNames sources; - nativeBuildInputs = [ - gettext makeQtWrapper pkgconfig - ]; + nativeBuildInputs = [ gettext pkgconfig ]; buildInputs = [ # Core dependencies @@ -68,15 +66,9 @@ stdenv.mkDerivation { fi done - - source $stdenv/setup - wrapQtProgram $out/bin/audacious - wrapQtProgram $out/bin/audtool ''; - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = with lib; { description = "Audio player"; homepage = http://audacious-media-player.org/; maintainers = with maintainers; [ ttuegel ]; diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix index 3231e3e5301..82a6d44f643 100644 --- a/pkgs/applications/audio/cantata/default.nix +++ b/pkgs/applications/audio/cantata/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, cmake, vlc , withQt4 ? false, qt4 -, withQt5 ? true, qtbase, qtsvg, qttools, makeQtWrapper +, withQt5 ? true, qtbase, qtsvg, qttools # Cantata doesn't build with cdparanoia enabled so we disable that # default for now until I (or someone else) figure it out. @@ -63,8 +63,6 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional withMusicbrainz libmusicbrainz5 ++ stdenv.lib.optional (withTaglib && withDevices) udisks2; - nativeBuildInputs = stdenv.lib.optional withQt5 makeQtWrapper; - cmakeFlags = stdenv.lib.flatten [ (fstat withQt5 "QT5") (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ]) @@ -88,10 +86,6 @@ stdenv.mkDerivation rec { sed -i -e 's/STRLESS/VERSION_LESS/g' cmake/FindTaglib.cmake ''; - postInstall = stdenv.lib.optionalString withQt5 '' - wrapQtProgram "$out/bin/cantata" - ''; - meta = with stdenv.lib; { homepage = https://github.com/cdrummond/cantata; description = "A graphical client for MPD"; diff --git a/pkgs/applications/audio/dfasma/default.nix b/pkgs/applications/audio/dfasma/default.nix index d006f2c0178..918accb4e16 100644 --- a/pkgs/applications/audio/dfasma/default.nix +++ b/pkgs/applications/audio/dfasma/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmakeHook, makeQtWrapper }: +{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmake }: let @@ -37,9 +37,9 @@ in stdenv.mkDerivation rec { owner = "gillesdegottex"; }; - buildInputs = [ fftw libsndfile qtbase qtmultimedia qmakeHook ]; + buildInputs = [ fftw libsndfile qtbase qtmultimedia ]; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ qmake ]; postPatch = '' substituteInPlace dfasma.pro --replace '$$DFASMAVERSIONGITPRO' '${version}' @@ -53,10 +53,6 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; - postInstall = '' - wrapQtProgram "$out/bin/dfasma" - ''; - meta = with stdenv.lib; { description = "Analyse and compare audio files in time and frequency"; longDescription = '' diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix index bb4df5ea1db..e4c6c658efd 100644 --- a/pkgs/applications/audio/fmit/default.nix +++ b/pkgs/applications/audio/fmit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, freeglut, mesa_glu, qtbase, qtmultimedia, qmakeHook +{ stdenv, fetchFromGitHub, fftw, freeglut, mesa_glu, qtbase, qtmultimedia, qmake , alsaSupport ? true, alsaLib ? null , jackSupport ? false, libjack2 ? null , portaudioSupport ? false, portaudio ? null }: @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { owner = "gillesdegottex"; }; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ fftw qtbase qtmultimedia ] ++ optionals alsaSupport [ alsaLib ] ++ optionals jackSupport [ libjack2 ] diff --git a/pkgs/applications/audio/iannix/default.nix b/pkgs/applications/audio/iannix/default.nix index 83fd2b14ed2..d72a2b13c42 100644 --- a/pkgs/applications/audio/iannix/default.nix +++ b/pkgs/applications/audio/iannix/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmakeHook +{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake }: stdenv.mkDerivation rec { @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj"; }; - buildInputs = [ alsaLib pkgconfig qtbase qtscript qmakeHook ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ alsaLib pkgconfig qtbase qtscript ]; qmakeFlags = [ "PREFIX=/" ]; diff --git a/pkgs/applications/audio/keyfinder/default.nix b/pkgs/applications/audio/keyfinder/default.nix index 0cacd772493..6aaf14a5763 100644 --- a/pkgs/applications/audio/keyfinder/default.nix +++ b/pkgs/applications/audio/keyfinder/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmakeHook, taglib }: +{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmake, taglib }: stdenv.mkDerivation rec { name = "keyfinder-${version}"; @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { owner = "ibsh"; }; - buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns qmakeHook taglib ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns taglib ]; postPatch = '' substituteInPlace is_KeyFinder.pro \ diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix index d48f1eb851b..bdb9911d365 100644 --- a/pkgs/applications/audio/sonic-visualiser/default.nix +++ b/pkgs/applications/audio/sonic-visualiser/default.nix @@ -2,8 +2,8 @@ { stdenv, fetchurl, alsaLib, bzip2, fftw, libjack2, libX11, liblo , libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate -, libsndfile, pkgconfig, libpulseaudio, makeQtWrapper, qtbase, redland -, qmakeHook, rubberband, serd, sord, vampSDK, fftwFloat +, libsndfile, pkgconfig, libpulseaudio, qtbase, redland +, qmake, rubberband, serd, sord, vampSDK, fftwFloat }: stdenv.mkDerivation rec { @@ -16,11 +16,10 @@ stdenv.mkDerivation rec { }; buildInputs = - [ libsndfile qtbase qmakeHook fftw fftwFloat bzip2 librdf rubberband + [ libsndfile qtbase fftw fftwFloat bzip2 librdf rubberband libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland serd sord - pkgconfig # optional libjack2 # portaudio @@ -32,7 +31,7 @@ stdenv.mkDerivation rec { libX11 ]; - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ pkgconfig qmake ]; configurePhase = '' for i in sonic-visualiser svapp svcore svgui; @@ -44,7 +43,6 @@ stdenv.mkDerivation rec { mkdir -p $out/{bin,share/sonic-visualiser} cp sonic-visualiser $out/bin/ cp -r samples $out/share/sonic-visualiser/ - wrapQtProgram "$out/bin/sonic-visualiser" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix index d1f487b37ac..d54fb455fcb 100644 --- a/pkgs/applications/display-managers/sddm/default.nix +++ b/pkgs/applications/display-managers/sddm/default.nix @@ -1,121 +1,72 @@ -{ stdenv, lib, makeQtWrapper, fetchFromGitHub, fetchpatch +{ mkDerivation, lib, copyPathsToStore, fetchFromGitHub, fetchpatch , cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs, lndir , libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd -, themes }: let + version = "0.14.0"; - unwrapped = stdenv.mkDerivation rec { - name = "sddm-unwrapped-${version}"; - - src = fetchFromGitHub { - owner = "sddm"; - repo = "sddm"; - rev = "v${version}"; - sha256 = "0wwid23kw0725zpw67zchalg9mmharr7sn4yzhijq7wqpsczjfxj"; - }; - - patches = [ - ./0001-ignore-config-mtime.patch - (fetchpatch { /* Fix display of user avatars. */ - url = https://github.com/sddm/sddm/commit/ecb903e48822bd90650bdd64fe80754e3e9664cb.patch; - sha256 = "0zm88944pwdad8grmv0xwnxl23xml85ryc71x2xac233jxdyx6ms"; - }) - ]; - - postPatch = - # Module Qt5::Test must be included in `find_package` before it is used. - '' - sed -i CMakeLists.txt -e '/find_package(Qt5/ s|)| Test)|' - ''; - - nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ]; - - buildInputs = [ - libxcb libpthreadstubs libXdmcp libXau pam systemd - ]; - - propagatedBuildInputs = [ - qtbase qtdeclarative - ]; - - cmakeFlags = [ - "-DCONFIG_FILE=/etc/sddm.conf" - # Set UID_MIN and UID_MAX so that the build script won't try - # to read them from /etc/login.defs (fails in chroot). - # The values come from NixOS; they may not be appropriate - # for running SDDM outside NixOS, but that configuration is - # not supported anyway. - "-DUID_MIN=1000" - "-DUID_MAX=29999" - ]; - - preConfigure = '' - export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system" - ''; - - enableParallelBuilding = true; - - postInstall = '' - # remove empty scripts - rm "$out/share/sddm/scripts/Xsetup" "$out/share/sddm/scripts/Xstop" - ''; - - meta = with stdenv.lib; { - description = "QML based X11 display manager"; - homepage = "https://github.com/sddm/sddm"; - platforms = platforms.linux; - maintainers = with maintainers; [ abbradar ttuegel ]; - }; + /* Fix display of user avatars. */ + patchFixUserAvatars = fetchpatch { + url = https://github.com/sddm/sddm/commit/ecb903e48822bd90650bdd64fe80754e3e9664cb.patch; + sha256 = "0zm88944pwdad8grmv0xwnxl23xml85ryc71x2xac233jxdyx6ms"; }; -in +in mkDerivation rec { + name = "sddm-unwrapped-${version}"; -stdenv.mkDerivation { - name = "sddm-${version}"; + src = fetchFromGitHub { + owner = "sddm"; + repo = "sddm"; + rev = "v${version}"; + sha256 = "0wwid23kw0725zpw67zchalg9mmharr7sn4yzhijq7wqpsczjfxj"; + }; - nativeBuildInputs = [ lndir makeQtWrapper ]; - buildInputs = [ unwrapped ] ++ themes; - themes = map (pkg: pkg.out or pkg) themes; - inherit unwrapped; + patches = + copyPathsToStore (lib.readPathsFromFile ./. ./series) + ++ [ patchFixUserAvatars ]; - unpackPhase = "true"; - configurePhase = "runHook preConfigure; runHook postConfigure"; - buildPhase = "runHook preBuild; runHook postBuild"; + postPatch = + # Module Qt5::Test must be included in `find_package` before it is used. + '' + sed -i CMakeLists.txt -e '/find_package(Qt5/ s|)| Test)|' + ''; - installPhase = '' - runHook preInstall + nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig qttools ]; - propagated= - for i in $unwrapped $themes; do - findInputs $i propagated propagated-user-env-packages - if [ -z "$crossConfig" ]; then - findInputs $i propagated propagated-native-build-inputs - else - findInputs $i propagated propagated-build-inputs - fi - done + buildInputs = [ + libxcb libpthreadstubs libXdmcp libXau pam systemd + ]; - for pkg in $propagated; do - addToSearchPath RUNTIME_XDG_DATA_DIRS "$pkg/share" - addToSearchPath RUNTIME_XDG_CONFIG_DIRS "$pkg/etc/xdg" - done + propagatedBuildInputs = [ + qtbase qtdeclarative + ]; - mkdir -p "$out/bin" - makeQtWrapper "$unwrapped/bin/sddm" "$out/bin/sddm" + cmakeFlags = [ + "-DCONFIG_FILE=/etc/sddm.conf" + # Set UID_MIN and UID_MAX so that the build script won't try + # to read them from /etc/login.defs (fails in chroot). + # The values come from NixOS; they may not be appropriate + # for running SDDM outside NixOS, but that configuration is + # not supported anyway. + "-DUID_MIN=1000" + "-DUID_MAX=29999" + ]; - mkdir -p "$out/share/sddm" - for pkg in $unwrapped $themes; do - local sddmDir="$pkg/share/sddm" - if [ -d "$sddmDir" ]; then - lndir -silent "$sddmDir" "$out/share/sddm" - fi - done - - runHook postInstall + preConfigure = '' + export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/$qtQmlPrefix -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system" ''; - inherit (unwrapped) meta; + postInstall = '' + # remove empty scripts + rm "$out/share/sddm/scripts/Xsetup" "$out/share/sddm/scripts/Xstop" + ''; + + meta = with lib; { + description = "QML based X11 display manager"; + homepage = "https://github.com/sddm/sddm"; + platforms = platforms.linux; + maintainers = with maintainers; [ abbradar ttuegel ]; + }; } diff --git a/pkgs/applications/display-managers/sddm/0001-ignore-config-mtime.patch b/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch similarity index 100% rename from pkgs/applications/display-managers/sddm/0001-ignore-config-mtime.patch rename to pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch diff --git a/pkgs/applications/display-managers/sddm/series b/pkgs/applications/display-managers/sddm/series new file mode 100644 index 00000000000..cb6ea65fedb --- /dev/null +++ b/pkgs/applications/display-managers/sddm/series @@ -0,0 +1 @@ +sddm-ignore-config-mtime.patch \ No newline at end of file diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix index c599666f4d5..bbd9be22074 100644 --- a/pkgs/applications/editors/kdevelop5/kdevelop.nix +++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, gettext, pkgconfig, extra-cmake-modules, makeQtWrapper +{ mkDerivation, lib, fetchurl, cmake, gettext, pkgconfig, extra-cmake-modules , qtquickcontrols, qtwebkit, qttools, kde-cli-tools , kconfig, kdeclarative, kdoctools, kiconthemes, ki18n, kitemmodels, kitemviews , kjobwidgets, kcmutils, kio, knewstuff, knotifyconfig, kparts, ktexteditor @@ -12,7 +12,7 @@ let version = "5.1.1"; in -stdenv.mkDerivation rec { +mkDerivation rec { name = "${pname}-${version}"; src = fetchurl { @@ -21,24 +21,26 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - cmake gettext pkgconfig extra-cmake-modules makeWrapper makeQtWrapper + cmake gettext pkgconfig extra-cmake-modules makeWrapper ]; buildInputs = [ + kdevelop-pg-qt + llvmPackages.llvm llvmPackages.clang-unwrapped + ]; + + propagatedBuildInputs = [ qtquickcontrols qtwebkit kconfig kdeclarative kdoctools kiconthemes ki18n kitemmodels kitemviews kjobwidgets kcmutils kio knewstuff knotifyconfig kparts ktexteditor threadweaver kxmlgui kwindowsystem grantlee plasma-framework krunner - kdevplatform kdevelop-pg-qt shared_mime_info libksysguard konsole.unwrapped - llvmPackages.llvm llvmPackages.clang-unwrapped + kdevplatform shared_mime_info libksysguard konsole ]; postInstall = '' - wrapQtProgram "$out/bin/kdevelop" - # The kdevelop! script (shell environment) needs qdbus and kioclient5 in PATH. wrapProgram "$out/bin/kdevelop!" --prefix PATH ":" "${qttools}/bin:${kde-cli-tools}/bin" - + # Fix the (now wrapped) kdevelop! to find things in right places: # - Make KDEV_BASEDIR point to bin directory of kdevplatform. kdev_fixup_sed="s|^export KDEV_BASEDIR=.*$|export KDEV_BASEDIR=${kdevplatform}/bin|" @@ -47,7 +49,7 @@ stdenv.mkDerivation rec { sed -E -i "$kdev_fixup_sed" "$out/bin/.kdevelop!-wrapped" ''; - meta = with stdenv.lib; { + meta = with lib; { maintainers = [ maintainers.ambrop72 ]; platforms = platforms.linux; description = "KDE official IDE"; @@ -60,6 +62,6 @@ stdenv.mkDerivation rec { libraries and is under development since 1998. ''; homepage = https://www.kdevelop.org; - license = with stdenv.lib.licenses; [ gpl2Plus lgpl2Plus ]; + license = with licenses; [ gpl2Plus lgpl2Plus ]; }; } diff --git a/pkgs/applications/editors/kdevelop5/kdevplatform.nix b/pkgs/applications/editors/kdevelop5/kdevplatform.nix index d3680aff3d8..3efc1335c07 100644 --- a/pkgs/applications/editors/kdevelop5/kdevplatform.nix +++ b/pkgs/applications/editors/kdevelop5/kdevplatform.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, cmake, gettext, pkgconfig, extra-cmake-modules, makeQtWrapper +{ stdenv, fetchurl, fetchpatch, cmake, gettext, pkgconfig, extra-cmake-modules , boost, subversion, apr, aprutil , qtscript, qtwebkit, grantlee, karchive, kconfig, kcoreaddons, kguiaddons, kiconthemes, ki18n , kitemmodels, kitemviews, kio, kparts, sonnet, kcmutils, knewstuff, knotifications @@ -11,7 +11,7 @@ let in stdenv.mkDerivation rec { name = "${pname}-${version}"; - + src = fetchurl { url = "mirror://kde/stable/kdevelop/${version}/src/${name}.tar.xz"; sha256 = "3159440512b1373c1a4b35f401ba1f81217de9578372b45137af141eeda6e726"; @@ -25,9 +25,8 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ cmake gettext pkgconfig extra-cmake-modules makeQtWrapper ]; + nativeBuildInputs = [ cmake gettext pkgconfig extra-cmake-modules ]; - propagatedBuildInputs = [ ]; buildInputs = [ boost subversion apr aprutil qtscript qtwebkit grantlee karchive kconfig kcoreaddons kguiaddons kiconthemes diff --git a/pkgs/applications/editors/kile/default.nix b/pkgs/applications/editors/kile/default.nix index fa8d4d8313e..259c319c70f 100644 --- a/pkgs/applications/editors/kile/default.nix +++ b/pkgs/applications/editors/kile/default.nix @@ -1,9 +1,9 @@ -{ kdeDerivation +{ mkDerivation , lib , fetchgit , extra-cmake-modules , kdoctools -, kdeWrapper +, wrapGAppsHook , qtscript , kconfig , kcrash @@ -21,50 +21,43 @@ , poppler }: -let - unwrapped = - kdeDerivation rec { - name = "kile-${version}"; - version = "2017-02-09"; +mkDerivation rec { + name = "kile-${version}"; + version = "2017-02-09"; - src = fetchgit { - url = git://anongit.kde.org/kile.git; - rev = "f77f6e627487c152f111e307ad6dc71699ade746"; - sha256 = "0wpqaix9ssa28cm7qqjj0zfrscjgk8s3kmi5b4kk8h583gsrikib"; + src = fetchgit { + url = git://anongit.kde.org/kile.git; + rev = "f77f6e627487c152f111e307ad6dc71699ade746"; + sha256 = "0wpqaix9ssa28cm7qqjj0zfrscjgk8s3kmi5b4kk8h583gsrikib"; - }; + }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + nativeBuildInputs = [ extra-cmake-modules wrapGAppsHook ]; - buildInputs = [ - kconfig - kcrash - kdbusaddons - kdelibs4support - kdoctools - kguiaddons - kiconthemes - kinit - khtml - kparts - ktexteditor - kwindowsystem - okular.unwrapped - poppler - qtscript - ]; + propagatedBuildInputs = [ + kconfig + kcrash + kdbusaddons + kdelibs4support + kdoctools + kguiaddons + kiconthemes + kinit + khtml + kparts + ktexteditor + kwindowsystem + okular + poppler + qtscript + ]; - meta = { - description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment"; - homepage = https://www.kde.org/applications/office/kile/; - maintainers = with lib.maintainers; [ fridh ]; - license = lib.licenses.gpl2Plus; - }; - }; -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/kile" ]; - paths = [ konsole.unwrapped okular.unwrapped ]; + propagatedUserEnvPkgs = [ konsole ]; + + meta = { + description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment"; + homepage = https://www.kde.org/applications/office/kile/; + maintainers = with lib.maintainers; [ fridh ]; + license = lib.licenses.gpl2Plus; + }; } diff --git a/pkgs/applications/editors/neovim/qt.nix b/pkgs/applications/editors/neovim/qt.nix index 57f52f0e5fc..e24ca50a024 100644 --- a/pkgs/applications/editors/neovim/qt.nix +++ b/pkgs/applications/editors/neovim/qt.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, cmake, doxygen -, libmsgpack, makeQtWrapper, neovim, pythonPackages, qtbase }: +{ stdenv, fetchFromGitHub, cmake, doxygen, makeWrapper +, libmsgpack, neovim, pythonPackages, qtbase }: stdenv.mkDerivation rec { name = "neovim-qt-${version}"; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { jinja2 msgpack python ]); - nativeBuildInputs = [ cmake doxygen makeQtWrapper ]; + nativeBuildInputs = [ cmake doxygen makeWrapper ]; enableParallelBuilding = true; @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapQtProgram "$out/bin/nvim-qt" \ + wrapProgram "$out/bin/nvim-qt" \ --prefix PATH : "${neovim}/bin" ''; diff --git a/pkgs/applications/editors/rstudio/default.nix b/pkgs/applications/editors/rstudio/default.nix index eab1228da1a..9ac91e7086a 100644 --- a/pkgs/applications/editors/rstudio/default.nix +++ b/pkgs/applications/editors/rstudio/default.nix @@ -10,7 +10,8 @@ in stdenv.mkDerivation rec { name = "RStudio-${version}"; - buildInputs = [ cmake boost163 zlib openssl R qt5.full qt5.qtwebkit qt5.qmakeHook libuuid unzip ant jdk makeWrapper pandoc ]; + buildInputs = [ cmake boost163 zlib openssl R qt5.full qt5.qtwebkit libuuid unzip ant jdk makeWrapper pandoc ]; + nativeBuildInputs = [ qt5.qmake ]; src = fetchurl { url = "https://github.com/rstudio/rstudio/archive/v${version}.tar.gz"; @@ -90,7 +91,7 @@ stdenv.mkDerivation rec { cp ${pandoc}/bin/pandoc dependencies/common/pandoc/ ''; - cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=${qt5.qmakeHook}/bin/qmake" ]; + cmakeFlags = [ "-DRSTUDIO_TARGET=Desktop" "-DQT_QMAKE_EXECUTABLE=${qt5.qmake}/bin/qmake" ]; desktopItem = makeDesktopItem { name = name; diff --git a/pkgs/applications/editors/tiled/default.nix b/pkgs/applications/editors/tiled/default.nix index be518b9336a..9bfa3998926 100644 --- a/pkgs/applications/editors/tiled/default.nix +++ b/pkgs/applications/editors/tiled/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, qmakeHook +{ stdenv, fetchFromGitHub, pkgconfig, qmake , python, qtbase, qttools, zlib }: let @@ -14,7 +14,7 @@ in stdenv.mkDerivation rec { sha256 = "087jl36g6w2g5l70gz573iwyvx3r7i8fijl3y4mmmf8pyqdyq1n2"; }; - nativeBuildInputs = [ pkgconfig qmakeHook ]; + nativeBuildInputs = [ pkgconfig qmake ]; buildInputs = [ python qtbase qttools ]; enableParallelBuilding = true; diff --git a/pkgs/applications/graphics/awesomebump/default.nix b/pkgs/applications/graphics/awesomebump/default.nix index b89e18ed148..9e0916bab9c 100644 --- a/pkgs/applications/graphics/awesomebump/default.nix +++ b/pkgs/applications/graphics/awesomebump/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, qtbase, qmakeHook, makeWrapper }: +{ lib, stdenv, fetchurl, qtbase, qmake, makeWrapper }: stdenv.mkDerivation { name = "awesomebump-4.0"; @@ -10,7 +10,8 @@ stdenv.mkDerivation { setSourceRoot = "sourceRoot=$(echo */Sources)"; - buildInputs = [ qtbase qmakeHook makeWrapper ]; + nativeBuildInputs = [ makeWrapper qmake ]; + buildInputs = [ qtbase ]; enableParallelBuilding = true; diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index f1179101692..96b1ca54d55 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, extra-cmake-modules, makeQtWrapper +{ mkDerivation, lib, fetchurl, cmake, extra-cmake-modules, wrapGAppsHook # For `digitaglinktree` , perl, sqlite @@ -44,7 +44,7 @@ , oxygen }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "digikam-${version}"; version = "5.4.0"; @@ -53,26 +53,11 @@ stdenv.mkDerivation rec { sha256 = "0dgsgji14l5zvxny36hrfsp889fsfrsbbn9bg57m18404xp903kg"; }; - nativeBuildInputs = [ cmake extra-cmake-modules makeQtWrapper ]; + nativeBuildInputs = [ cmake extra-cmake-modules kdoctools wrapGAppsHook ]; patches = [ ./0001-Disable-fno-operator-names.patch ]; buildInputs = [ - qtbase - qtxmlpatterns - qtsvg - qtwebkit - - kconfigwidgets - kcoreaddons - kdoctools - kfilemetadata - knotifications - knotifyconfig - ktextwidgets - kwidgetsaddons - kxmlgui - bison boost eigen @@ -86,12 +71,28 @@ stdenv.mkDerivation rec { liblqr1 libqtav libusb1 - marble.unwrapped mysql opencv - threadweaver + ]; + propagatedBuildInputs = [ + qtbase + qtxmlpatterns + qtsvg + qtwebkit + + kconfigwidgets + kcoreaddons + kfilemetadata + knotifications + knotifyconfig + ktextwidgets + kwidgetsaddons + kxmlgui + + marble oxygen + threadweaver ]; enableParallelBuilding = true; @@ -104,22 +105,18 @@ stdenv.mkDerivation rec { "-DENABLE_MEDIAPLAYER=1" ]; - fixupPhase = '' + preFixup = '' + gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnumake hugin enblend-enfuse ]}) substituteInPlace $out/bin/digitaglinktree \ --replace "/usr/bin/perl" "${perl}/bin/perl" \ --replace "/usr/bin/sqlite3" "${sqlite}/bin/sqlite3" - - wrapQtProgram $out/bin/digikam \ - --prefix PATH : "${gnumake}/bin:${hugin}/bin:${enblend-enfuse}/bin" - - wrapQtProgram $out/bin/showfoto ''; - meta = { + meta = with lib; { description = "Photo Management Program"; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; homepage = http://www.digikam.org; - maintainers = with stdenv.lib.maintainers; [ the-kenny ]; - platforms = stdenv.lib.platforms.linux; + maintainers = with maintainers; [ the-kenny ]; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/graphics/ipe/default.nix b/pkgs/applications/graphics/ipe/default.nix index 4a99d0ea4a1..2b1b1f8da8a 100644 --- a/pkgs/applications/graphics/ipe/default.nix +++ b/pkgs/applications/graphics/ipe/default.nix @@ -1,6 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, zlib, freetype, cairo, lua5, texlive, ghostscript +{ stdenv, fetchurl, makeWrapper, pkgconfig, zlib, freetype, cairo, lua5, texlive, ghostscript , libjpeg, qtbase -, makeQtWrapper }: stdenv.mkDerivation rec { @@ -28,14 +27,14 @@ stdenv.mkDerivation rec { LUA_PACKAGE = "lua"; buildInputs = [ - libjpeg pkgconfig zlib qtbase freetype cairo lua5 texlive ghostscript + libjpeg zlib qtbase freetype cairo lua5 texlive ghostscript ]; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ makeWrapper pkgconfig ]; postFixup = '' for prog in $out/bin/*; do - wrapQtProgram "$prog" --prefix PATH : "${texlive}/bin" + wrapProgram "$prog" --prefix PATH : "${texlive}/bin" done ''; diff --git a/pkgs/applications/graphics/krita/default.nix b/pkgs/applications/graphics/krita/default.nix index c82d1565a55..121afdf2084 100644 --- a/pkgs/applications/graphics/krita/default.nix +++ b/pkgs/applications/graphics/krita/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, cmake, extra-cmake-modules, makeQtWrapper +{ mkDerivation, lib, fetchurl, cmake, extra-cmake-modules , karchive, kconfig, kwidgetsaddons, kcompletion, kcoreaddons , kguiaddons, ki18n, kitemmodels, kitemviews, kwindowsystem , kio, kcrash @@ -6,7 +6,7 @@ , openjpeg, opencolorio, vc, poppler_qt5, curl, ilmbase }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "krita-${version}"; ver_min = "3.1.3"; version = "${ver_min}"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { sha256 = "125js6c8aw4bqhs28pwnl3rbgqx5yx4zsklw7bfdhy3vf6lrysw1"; }; - nativeBuildInputs = [ cmake extra-cmake-modules makeQtWrapper ]; + nativeBuildInputs = [ cmake extra-cmake-modules ]; buildInputs = [ karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons @@ -27,15 +27,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-I${ilmbase.dev}/include/OpenEXR" ]; - enableParallelBuilding = true; - - postInstall = '' - for i in $out/bin/*; do - wrapQtProgram "$i" - done - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "A free an open source painting application"; homepage = "https://krita.org/"; maintainers = with maintainers; [ abbradar ]; diff --git a/pkgs/applications/graphics/photoqt/default.nix b/pkgs/applications/graphics/photoqt/default.nix index f9b24581929..d6bcdee4137 100644 --- a/pkgs/applications/graphics/photoqt/default.nix +++ b/pkgs/applications/graphics/photoqt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, makeQtWrapper, exiv2, graphicsmagick +{ stdenv, fetchurl, cmake, exiv2, graphicsmagick , qtbase, qtdeclarative, qtmultimedia, qtquickcontrols, qttools }: @@ -12,8 +12,9 @@ stdenv.mkDerivation rec { sha256 = "0j2kvxfb5pd9abciv161nkcsyam6n8kfqs8ymwj2mxiqflwbmfl1"; }; + nativeBuildInputs = [ cmake ]; buildInputs = [ - cmake makeQtWrapper qtbase qtquickcontrols qttools exiv2 graphicsmagick + qtbase qtquickcontrols qttools exiv2 graphicsmagick qtmultimedia qtdeclarative ]; @@ -21,10 +22,6 @@ stdenv.mkDerivation rec { export MAGICK_LOCATION="${graphicsmagick}/include/GraphicsMagick" ''; - postInstall = '' - wrapQtProgram $out/bin/photoqt - ''; - meta = { homepage = "http://photoqt.org/"; description = "Simple, yet powerful and good looking image viewer"; diff --git a/pkgs/applications/graphics/phototonic/default.nix b/pkgs/applications/graphics/phototonic/default.nix index 4782376d1e0..8ce9d407aad 100644 --- a/pkgs/applications/graphics/phototonic/default.nix +++ b/pkgs/applications/graphics/phototonic/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, qmakeHook, exiv2 }: +{ stdenv, fetchFromGitHub, qtbase, qmake, exiv2 }: stdenv.mkDerivation rec { name = "phototonic-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase exiv2 ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; preConfigure = '' sed -i 's;/usr;$$PREFIX/;g' phototonic.pro diff --git a/pkgs/applications/graphics/rapcad/default.nix b/pkgs/applications/graphics/rapcad/default.nix index b7672a39d0d..451eaae79b2 100644 --- a/pkgs/applications/graphics/rapcad/default.nix +++ b/pkgs/applications/graphics/rapcad/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchurl, cgal, boost, gmp, mpfr, flex, bison, dxflib, readline -, qtbase, qmakeHook, mesa_glu +, qtbase, qmake, mesa_glu }: stdenv.mkDerivation rec { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ qtbase cgal boost gmp mpfr flex bison dxflib readline mesa_glu ]; meta = with stdenv.lib; { diff --git a/pkgs/applications/graphics/renderdoc/default.nix b/pkgs/applications/graphics/renderdoc/default.nix index be4457c932f..d69f9a676c1 100644 --- a/pkgs/applications/graphics/renderdoc/default.nix +++ b/pkgs/applications/graphics/renderdoc/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, cmake, qtbase, qtx11extras -, pkgconfig, xorg, makeQtWrapper, vulkan-loader +{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig +, qtbase, qtx11extras, vulkan-loader, xorg }: stdenv.mkDerivation rec { @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase xorg.libpthreadstubs xorg.libXdmcp qtx11extras vulkan-loader ]; - nativeBuildInputs = [ cmake makeQtWrapper pkgconfig ]; + nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; cmakeFlags = [ "-DBUILD_VERSION_HASH=${src.rev}-distro-nix" @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { mkdir $out/bin/.bin mv $out/bin/qrenderdoc $out/bin/.bin/qrenderdoc ln -s $out/bin/.bin/qrenderdoc $out/bin/qrenderdoc - wrapQtProgram $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib + wrapProgram $out/bin/qrenderdoc --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib mv $out/bin/renderdoccmd $out/bin/.bin/renderdoccmd ln -s $out/bin/.bin/renderdoccmd $out/bin/renderdoccmd wrapProgram $out/bin/renderdoccmd --suffix LD_LIBRARY_PATH : $out/lib --suffix LD_LIBRARY_PATH : ${vulkan-loader}/lib diff --git a/pkgs/applications/kde/akonadi-contacts.nix b/pkgs/applications/kde/akonadi-contacts.nix index 830c9e6899e..3f410b7b8b9 100644 --- a/pkgs/applications/kde/akonadi-contacts.nix +++ b/pkgs/applications/kde/akonadi-contacts.nix @@ -1,11 +1,11 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, - akonadi-mime, grantlee, kcontacts, kio, kitemmodels, kmime, qtwebengine, - akonadi + akonadi, akonadi-mime, grantlee, kcontacts, kdbusaddons, ki18n, kiconthemes, + kio, kitemmodels, kmime, ktextwidgets, qtwebengine, }: -kdeApp { +mkDerivation { name = "akonadi-contacts"; meta = { license = with lib.licenses; [ gpl2 lgpl21 ]; @@ -13,7 +13,9 @@ kdeApp { }; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ - akonadi-mime grantlee kcontacts kio kitemmodels kmime qtwebengine + akonadi-mime grantlee kcontacts kdbusaddons ki18n kiconthemes kio + kitemmodels kmime ktextwidgets qtwebengine ]; propagatedBuildInputs = [ akonadi ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/applications/kde/akonadi-mime.nix b/pkgs/applications/kde/akonadi-mime.nix index ba4b4b50242..1fb50756665 100644 --- a/pkgs/applications/kde/akonadi-mime.nix +++ b/pkgs/applications/kde/akonadi-mime.nix @@ -1,15 +1,16 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, - akonadi, kdbusaddons, kio, kitemmodels, kmime + akonadi, kdbusaddons, ki18n, kio, kitemmodels, kmime }: -kdeApp { +mkDerivation { name = "akonadi-mime"; meta = { license = with lib.licenses; [ gpl2 lgpl21 ]; maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ akonadi kdbusaddons kio kitemmodels kmime ]; + buildInputs = [ akonadi kdbusaddons ki18n kio kitemmodels kmime ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/applications/kde/akonadi.nix b/pkgs/applications/kde/akonadi.nix deleted file mode 100644 index 284ed60a9cb..00000000000 --- a/pkgs/applications/kde/akonadi.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - kdeApp, lib, - extra-cmake-modules, - kcompletion, kconfigwidgets, kdbusaddons, kdesignerplugin, kiconthemes, - kio, - boost, kitemmodels -}: - -kdeApp { - name = "akonadi"; - meta = { - license = [ lib.licenses.lgpl21 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ - kcompletion kconfigwidgets kdbusaddons kdesignerplugin kiconthemes kio - ]; - propagatedBuildInputs = [ boost kitemmodels ]; -} diff --git a/pkgs/applications/kde/akonadi/akonadi-paths.patch b/pkgs/applications/kde/akonadi/akonadi-paths.patch new file mode 100644 index 00000000000..f1ae1f23cc9 --- /dev/null +++ b/pkgs/applications/kde/akonadi/akonadi-paths.patch @@ -0,0 +1,191 @@ +Index: akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp +=================================================================== +--- akonadi-17.04.0.orig/src/server/storage/dbconfigmysql.cpp ++++ akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp +@@ -63,7 +63,6 @@ bool DbConfigMysql::init(QSettings &sett + // determine default settings depending on the driver + QString defaultHostName; + QString defaultOptions; +- QString defaultServerPath; + QString defaultCleanShutdownCommand; + + #ifndef Q_OS_WIN +@@ -71,25 +70,8 @@ bool DbConfigMysql::init(QSettings &sett + #endif + + const bool defaultInternalServer = true; +-#ifdef MYSQLD_EXECUTABLE +- if (QFile::exists(QStringLiteral(MYSQLD_EXECUTABLE))) { +- defaultServerPath = QStringLiteral(MYSQLD_EXECUTABLE); +- } +-#endif +- const QStringList mysqldSearchPath = QStringList() +- << QStringLiteral("/usr/bin") +- << QStringLiteral("/usr/sbin") +- << QStringLiteral("/usr/local/sbin") +- << QStringLiteral("/usr/local/libexec") +- << QStringLiteral("/usr/libexec") +- << QStringLiteral("/opt/mysql/libexec") +- << QStringLiteral("/opt/local/lib/mysql5/bin") +- << QStringLiteral("/opt/mysql/sbin"); +- if (defaultServerPath.isEmpty()) { +- defaultServerPath = XdgBaseDirs::findExecutableFile(QStringLiteral("mysqld"), mysqldSearchPath); +- } + +- const QString mysqladminPath = XdgBaseDirs::findExecutableFile(QStringLiteral("mysqladmin"), mysqldSearchPath); ++ const QString mysqladminPath = QStringLiteral(NIXPKGS_MYSQL_MYSQLADMIN); + if (!mysqladminPath.isEmpty()) { + #ifndef Q_OS_WIN + defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/mysql.socket shutdown") +@@ -99,10 +81,10 @@ bool DbConfigMysql::init(QSettings &sett + #endif + } + +- mMysqlInstallDbPath = XdgBaseDirs::findExecutableFile(QStringLiteral("mysql_install_db"), mysqldSearchPath); ++ mMysqlInstallDbPath = QStringLiteral(NIXPKGS_MYSQL_MYSQL_INSTALL_DB); + qCDebug(AKONADISERVER_LOG) << "Found mysql_install_db: " << mMysqlInstallDbPath; + +- mMysqlCheckPath = XdgBaseDirs::findExecutableFile(QStringLiteral("mysqlcheck"), mysqldSearchPath); ++ mMysqlCheckPath = QStringLiteral(NIXPKGS_MYSQL_MYSQLCHECK); + qCDebug(AKONADISERVER_LOG) << "Found mysqlcheck: " << mMysqlCheckPath; + + mInternalServer = settings.value(QStringLiteral("QMYSQL/StartServer"), defaultInternalServer).toBool(); +@@ -119,7 +101,7 @@ bool DbConfigMysql::init(QSettings &sett + mUserName = settings.value(QStringLiteral("User")).toString(); + mPassword = settings.value(QStringLiteral("Password")).toString(); + mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString(); +- mMysqldPath = settings.value(QStringLiteral("ServerPath"), defaultServerPath).toString(); ++ mMysqldPath = QStringLiteral(NIXPKGS_MYSQL_MYSQLD); + mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString(); + settings.endGroup(); + +@@ -129,9 +111,6 @@ bool DbConfigMysql::init(QSettings &sett + // intentionally not namespaced as we are the only one in this db instance when using internal mode + mDatabaseName = QStringLiteral("akonadi"); + } +- if (mInternalServer && (mMysqldPath.isEmpty() || !QFile::exists(mMysqldPath))) { +- mMysqldPath = defaultServerPath; +- } + + qCDebug(AKONADISERVER_LOG) << "Using mysqld:" << mMysqldPath; + +@@ -140,9 +119,6 @@ bool DbConfigMysql::init(QSettings &sett + settings.setValue(QStringLiteral("Name"), mDatabaseName); + settings.setValue(QStringLiteral("Host"), mHostName); + settings.setValue(QStringLiteral("Options"), mConnectionOptions); +- if (!mMysqldPath.isEmpty()) { +- settings.setValue(QStringLiteral("ServerPath"), mMysqldPath); +- } + settings.setValue(QStringLiteral("StartServer"), mInternalServer); + settings.endGroup(); + settings.sync(); +@@ -196,7 +172,7 @@ bool DbConfigMysql::startInternalServer( + #endif + + // generate config file +- const QString globalConfig = XdgBaseDirs::findResourceFile("config", QStringLiteral("akonadi/mysql-global.conf")); ++ const QString globalConfig = QStringLiteral(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf"); + const QString localConfig = XdgBaseDirs::findResourceFile("config", QStringLiteral("akonadi/mysql-local.conf")); + const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf"); + if (globalConfig.isEmpty()) { +Index: akonadi-17.04.0/src/server/storage/dbconfigpostgresql.cpp +=================================================================== +--- akonadi-17.04.0.orig/src/server/storage/dbconfigpostgresql.cpp ++++ akonadi-17.04.0/src/server/storage/dbconfigpostgresql.cpp +@@ -58,7 +58,6 @@ bool DbConfigPostgresql::init(QSettings + // determine default settings depending on the driver + QString defaultHostName; + QString defaultOptions; +- QString defaultServerPath; + QString defaultInitDbPath; + QString defaultPgData; + +@@ -70,35 +69,7 @@ bool DbConfigPostgresql::init(QSettings + + mInternalServer = settings.value(QStringLiteral("QPSQL/StartServer"), defaultInternalServer).toBool(); + if (mInternalServer) { +- QStringList postgresSearchPath; +- +-#ifdef POSTGRES_PATH +- const QString dir(QStringLiteral(POSTGRES_PATH)); +- if (QDir(dir).exists()) { +- postgresSearchPath << QStringLiteral(POSTGRES_PATH); +- } +-#endif +- postgresSearchPath << QStringLiteral("/usr/sbin") +- << QStringLiteral("/usr/local/sbin"); +- // Locale all versions in /usr/lib/postgresql (i.e. /usr/lib/postgresql/X.Y) in reversed +- // sorted order, so we search from the newest one to the oldest. +- QStringList postgresVersionedSearchPaths; +- QDir versionedDir(QStringLiteral("/usr/lib/postgresql")); +- if (versionedDir.exists()) { +- const auto versionedDirs = versionedDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed); +- for (const auto &path : versionedDirs) { +- // Don't break once PostgreSQL 10 is released, but something more future-proof will be needed +- if (path.fileName().startsWith(QLatin1String("10."))) { +- postgresVersionedSearchPaths.prepend(path.absoluteFilePath() + QStringLiteral("/bin")); +- } else { +- postgresVersionedSearchPaths.append(path.absoluteFilePath() + QStringLiteral("/bin")); +- } +- } +- } +- postgresSearchPath.append(postgresVersionedSearchPaths); +- +- defaultServerPath = XdgBaseDirs::findExecutableFile(QStringLiteral("pg_ctl"), postgresSearchPath); +- defaultInitDbPath = XdgBaseDirs::findExecutableFile(QStringLiteral("initdb"), postgresSearchPath); ++ defaultInitDbPath = QStringLiteral(NIXPKGS_POSTGRES_INITDB); + defaultHostName = Utils::preferredSocketDirectory(StandardDirs::saveDir("data", QStringLiteral("db_misc"))); + defaultPgData = StandardDirs::saveDir("data", QStringLiteral("db_data")); + } +@@ -118,10 +89,7 @@ bool DbConfigPostgresql::init(QSettings + mUserName = settings.value(QStringLiteral("User")).toString(); + mPassword = settings.value(QStringLiteral("Password")).toString(); + mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString(); +- mServerPath = settings.value(QStringLiteral("ServerPath"), defaultServerPath).toString(); +- if (mInternalServer && mServerPath.isEmpty()) { +- mServerPath = defaultServerPath; +- } ++ mServerPath = QStringLiteral(NIXPKGS_POSTGRES_PG_CTL); + qCDebug(AKONADISERVER_LOG) << "Found pg_ctl:" << mServerPath; + mInitDbPath = settings.value(QStringLiteral("InitDbPath"), defaultInitDbPath).toString(); + if (mInternalServer && mInitDbPath.isEmpty()) { +@@ -142,7 +110,6 @@ bool DbConfigPostgresql::init(QSettings + settings.setValue(QStringLiteral("Port"), mHostPort); + } + settings.setValue(QStringLiteral("Options"), mConnectionOptions); +- settings.setValue(QStringLiteral("ServerPath"), mServerPath); + settings.setValue(QStringLiteral("InitDbPath"), mInitDbPath); + settings.setValue(QStringLiteral("StartServer"), mInternalServer); + settings.endGroup(); +Index: akonadi-17.04.0/src/akonadicontrol/agentprocessinstance.cpp +=================================================================== +--- akonadi-17.04.0.orig/src/akonadicontrol/agentprocessinstance.cpp ++++ akonadi-17.04.0/src/akonadicontrol/agentprocessinstance.cpp +@@ -62,7 +62,7 @@ bool AgentProcessInstance::start(const A + } else { + Q_ASSERT(agentInfo.launchMethod == AgentType::Launcher); + const QStringList arguments = QStringList() << executable << identifier(); +- const QString agentLauncherExec = XdgBaseDirs::findExecutableFile(QStringLiteral("akonadi_agent_launcher")); ++ const QString agentLauncherExec = QStringLiteral(NIX_OUT "/bin/akonadi_agent_launcher"); + mController->start(agentLauncherExec, arguments); + } + return true; +Index: akonadi-17.04.0/src/akonadicontrol/agentmanager.cpp +=================================================================== +--- akonadi-17.04.0.orig/src/akonadicontrol/agentmanager.cpp ++++ akonadi-17.04.0/src/akonadicontrol/agentmanager.cpp +@@ -102,12 +102,12 @@ AgentManager::AgentManager(bool verbose, + mStorageController = new Akonadi::ProcessControl; + mStorageController->setShutdownTimeout(15 * 1000); // the server needs more time for shutdown if we are using an internal mysqld + connect(mStorageController, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::serverFailure); +- mStorageController->start(QStringLiteral("akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash); ++ mStorageController->start(QStringLiteral(NIX_OUT "/bin/akonadiserver"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash); + + if (mAgentServerEnabled) { + mAgentServer = new Akonadi::ProcessControl; + connect(mAgentServer, &Akonadi::ProcessControl::unableToStart, this, &AgentManager::agentServerFailure); +- mAgentServer->start(QStringLiteral("akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash); ++ mAgentServer->start(QStringLiteral(NIX_OUT "/bin/akonadi_agent_server"), serviceArgs, Akonadi::ProcessControl::RestartOnCrash); + } + + #ifndef QT_NO_DEBUG diff --git a/pkgs/applications/kde/akonadi/akonadi-timestamps.patch b/pkgs/applications/kde/akonadi/akonadi-timestamps.patch new file mode 100644 index 00000000000..25a835f5ba2 --- /dev/null +++ b/pkgs/applications/kde/akonadi/akonadi-timestamps.patch @@ -0,0 +1,14 @@ +Index: akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp +=================================================================== +--- akonadi-17.04.0.orig/src/server/storage/dbconfigmysql.cpp ++++ akonadi-17.04.0/src/server/storage/dbconfigmysql.cpp +@@ -229,8 +229,7 @@ bool DbConfigMysql::startInternalServer( + bool confUpdate = false; + QFile actualFile(actualConfig); + // update conf only if either global (or local) is newer than actual +- if ((QFileInfo(globalConfig).lastModified() > QFileInfo(actualFile).lastModified()) || +- (QFileInfo(localConfig).lastModified() > QFileInfo(actualFile).lastModified())) { ++ if (true) { + QFile globalFile(globalConfig); + QFile localFile(localConfig); + if (globalFile.open(QFile::ReadOnly) && actualFile.open(QFile::WriteOnly)) { diff --git a/pkgs/applications/kde/akonadi/default.nix b/pkgs/applications/kde/akonadi/default.nix new file mode 100644 index 00000000000..a264ebc9f09 --- /dev/null +++ b/pkgs/applications/kde/akonadi/default.nix @@ -0,0 +1,36 @@ +{ + mkDerivation, copyPathsToStore, lib, + extra-cmake-modules, + kcompletion, kconfigwidgets, kdbusaddons, kdesignerplugin, kiconthemes, + kio, + boost, kitemmodels, + mysql +}: + +mkDerivation { + name = "akonadi"; + meta = { + license = [ lib.licenses.lgpl21 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ + kcompletion kconfigwidgets kdbusaddons kdesignerplugin kiconthemes kio + ]; + propagatedBuildInputs = [ boost kitemmodels ]; + cmakeFlags = [ + "-DMYSQLD_EXECUTABLE=${lib.getBin mysql}/bin/mysqld" + ]; + NIX_CFLAGS_COMPILE = [ + ''-DNIXPKGS_MYSQL_MYSQLD="${lib.getBin mysql}/bin/mysqld"'' + ''-DNIXPKGS_MYSQL_MYSQLADMIN="${lib.getBin mysql}/bin/mysqladmin"'' + ''-DNIXPKGS_MYSQL_MYSQL_INSTALL_DB="${lib.getBin mysql}/bin/mysql_install_db"'' + ''-DNIXPKGS_MYSQL_MYSQLCHECK="${lib.getBin mysql}/bin/mysqlcheck"'' + ''-DNIXPKGS_POSTGRES_PG_CTL=""'' + ''-DNIXPKGS_POSTGRES_INITDB=""'' + ]; + preConfigure = '' + NIX_CFLAGS_COMPILE+=" -DNIX_OUT=\"$out\"" + ''; +} diff --git a/pkgs/applications/kde/akonadi/series b/pkgs/applications/kde/akonadi/series new file mode 100644 index 00000000000..9e067f0a000 --- /dev/null +++ b/pkgs/applications/kde/akonadi/series @@ -0,0 +1,2 @@ +akonadi-paths.patch +akonadi-timestamps.patch diff --git a/pkgs/applications/kde/ark/default.nix b/pkgs/applications/kde/ark/default.nix index 52cb403f202..df15f6b0f18 100644 --- a/pkgs/applications/kde/ark/default.nix +++ b/pkgs/applications/kde/ark/default.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, config, kdeWrapper, + mkDerivation, lib, config, makeWrapper, - extra-cmake-modules, kdoctools, makeWrapper, + extra-cmake-modules, kdoctools, - karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, khtml, kio, - kservice, kpty, kwidgetsaddons, libarchive, kitemmodels, + karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, kitemmodels, + khtml, kio, kparts, kpty, kservice, kwidgetsaddons, libarchive, # Archive tools p7zip, unzipNLS, zip, @@ -13,35 +13,25 @@ unfreeEnableUnrar ? false, unrar, }: -let - unwrapped = - kdeApp { - name = "ark"; - nativeBuildInputs = [ - extra-cmake-modules kdoctools makeWrapper - ]; - propagatedBuildInputs = [ - khtml ki18n kio karchive kconfig kcrash kdbusaddons kiconthemes kservice - kpty kwidgetsaddons libarchive kitemmodels - ]; - postInstall = - let - PATH = - lib.makeBinPath - ([ p7zip unzipNLS zip ] ++ lib.optional unfreeEnableUnrar unrar); - in '' - wrapProgram "$out/bin/ark" \ - --prefix PATH : "${PATH}" - ''; - meta = { - license = with lib.licenses; - [ gpl2 lgpl3 ] ++ lib.optional unfreeEnableUnrar unfree; - maintainers = [ lib.maintainers.ttuegel ]; - }; - }; -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/ark" ]; +mkDerivation { + name = "ark"; + nativeBuildInputs = [ extra-cmake-modules kdoctools makeWrapper ]; + propagatedBuildInputs = [ + karchive kconfig kcrash kdbusaddons khtml ki18n kiconthemes kio kitemmodels + kparts kpty kservice kwidgetsaddons libarchive + ]; + outputs = [ "out" "dev" ]; + postFixup = + let + PATH = + lib.makeBinPath + ([ p7zip unzipNLS zip ] ++ lib.optional unfreeEnableUnrar unrar); + in '' + wrapProgram "$out/bin/ark" --prefix PATH: "${PATH}" + ''; + meta = { + license = with lib.licenses; + [ gpl2 lgpl3 ] ++ lib.optional unfreeEnableUnrar unfree; + maintainers = [ lib.maintainers.ttuegel ]; + }; } diff --git a/pkgs/applications/kde/baloo-widgets.nix b/pkgs/applications/kde/baloo-widgets.nix index bb680305709..3479b6600fc 100644 --- a/pkgs/applications/kde/baloo-widgets.nix +++ b/pkgs/applications/kde/baloo-widgets.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, kdoctools, baloo, kconfig, kdelibs4support, kfilemetadata, ki18n, kio, kservice }: -kdeApp { +mkDerivation { name = "baloo-widgets"; meta = { license = [ lib.licenses.lgpl21 ]; @@ -14,4 +14,5 @@ kdeApp { propagatedBuildInputs = [ baloo kconfig kdelibs4support kfilemetadata ki18n kio kservice ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/applications/kde/build-support/application.nix b/pkgs/applications/kde/build-support/application.nix index 92fdb439330..892d82fb51e 100644 --- a/pkgs/applications/kde/build-support/application.nix +++ b/pkgs/applications/kde/build-support/application.nix @@ -1,4 +1,4 @@ -{ kdeDerivation, lib, debug, srcs }: +{ mkDerivation, lib, srcs }: args: @@ -7,14 +7,11 @@ let sname = args.sname or name; inherit (srcs."${sname}") src version; in -kdeDerivation (args // { +mkDerivation (args // { name = "${name}-${version}"; inherit src; - cmakeFlags = - (args.cmakeFlags or []) - ++ [ "-DBUILD_TESTING=OFF" ] - ++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug"; + outputs = args.outputs or [ "out" "dev" ]; meta = { platforms = lib.platforms.linux; diff --git a/pkgs/applications/kde/default.nix b/pkgs/applications/kde/default.nix index 81c50147cb6..d8b8c4242cb 100644 --- a/pkgs/applications/kde/default.nix +++ b/pkgs/applications/kde/default.nix @@ -27,9 +27,7 @@ still shows most of the available features is in `./gwenview.nix`. { stdenv, lib, libsForQt5, fetchurl, recurseIntoAttrs, - kdeDerivation, plasma5, - attica, phonon, - debug ? false, + plasma5, attica, phonon, }: let @@ -42,14 +40,15 @@ let packages = self: with self; let callPackage = self.newScope { - kdeApp = import ./build-support/application.nix { - inherit lib kdeDerivation; - inherit debug srcs; + mkDerivation = import ./build-support/application.nix { + inherit lib; + inherit srcs; + mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; }; }; in { kdelibs = callPackage ./kdelibs { inherit attica phonon; }; - akonadi = callPackage ./akonadi.nix {}; + akonadi = callPackage ./akonadi {}; akonadi-contacts = callPackage ./akonadi-contacts.nix {}; akonadi-mime = callPackage ./akonadi-mime.nix {}; ark = callPackage ./ark/default.nix {}; diff --git a/pkgs/applications/kde/dolphin-plugins.nix b/pkgs/applications/kde/dolphin-plugins.nix index 7f436c7a55a..eb823641ae4 100644 --- a/pkgs/applications/kde/dolphin-plugins.nix +++ b/pkgs/applications/kde/dolphin-plugins.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, kdoctools, dolphin, kdelibs4support, ki18n, kio, kxmlgui }: -kdeApp { +mkDerivation { name = "dolphin-plugins"; meta = { license = [ lib.licenses.gpl2 ]; @@ -12,6 +12,6 @@ kdeApp { }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; propagatedBuildInputs = [ - dolphin.unwrapped kdelibs4support ki18n kio kxmlgui + dolphin kdelibs4support ki18n kio kxmlgui ]; } diff --git a/pkgs/applications/kde/dolphin.nix b/pkgs/applications/kde/dolphin.nix index 6515c230c28..2570e37bf2c 100644 --- a/pkgs/applications/kde/dolphin.nix +++ b/pkgs/applications/kde/dolphin.nix @@ -1,32 +1,24 @@ { - kdeApp, lib, kdeWrapper, - extra-cmake-modules, kdoctools, makeQtWrapper, + mkDerivation, lib, + extra-cmake-modules, kdoctools, baloo, baloo-widgets, dolphin-plugins, kactivities, kbookmarks, kcmutils, kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons, kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications, konsole, kparts, ktexteditor, kwindowsystem, phonon, solid }: -let - unwrapped = - kdeApp { - name = "dolphin"; - meta = { - license = with lib.licenses; [ gpl2 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig - kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes - kinit kio knewstuff knotifications kparts ktexteditor kwindowsystem - phonon solid - ]; - }; -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/dolphin" ]; - paths = [ dolphin-plugins konsole.unwrapped ]; +mkDerivation { + name = "dolphin"; + meta = { + license = with lib.licenses; [ gpl2 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ + baloo baloo-widgets kactivities kbookmarks kcmutils kcompletion kconfig + kcoreaddons kdelibs4support kdbusaddons kfilemetadata ki18n kiconthemes + kinit kio knewstuff knotifications kparts ktexteditor kwindowsystem + phonon solid + ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/applications/kde/ffmpegthumbs.nix b/pkgs/applications/kde/ffmpegthumbs.nix index 5dde6d8a64e..4e915422d14 100644 --- a/pkgs/applications/kde/ffmpegthumbs.nix +++ b/pkgs/applications/kde/ffmpegthumbs.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, ffmpeg, kio }: -kdeApp { +mkDerivation { name = "ffmpegthumbs"; meta = { license = with lib.licenses; [ gpl2 bsd3 ]; diff --git a/pkgs/applications/kde/filelight.nix b/pkgs/applications/kde/filelight.nix index 71ab51320ab..6eb219d8da9 100644 --- a/pkgs/applications/kde/filelight.nix +++ b/pkgs/applications/kde/filelight.nix @@ -1,24 +1,17 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kio, kparts, kxmlgui, qtscript, solid }: -let - unwrapped = - kdeApp { - name = "filelight"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ fridh vcunat ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kio kparts kxmlgui qtscript solid - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/filelight" ]; +mkDerivation { + name = "filelight"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ fridh vcunat ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ + kio kparts kxmlgui qtscript solid + ]; } diff --git a/pkgs/applications/kde/gwenview.nix b/pkgs/applications/kde/gwenview.nix index 0fa06ed0fbe..233566c1bda 100644 --- a/pkgs/applications/kde/gwenview.nix +++ b/pkgs/applications/kde/gwenview.nix @@ -1,27 +1,21 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, - baloo, exiv2, kactivities, kdelibs4support, kio, kipi-plugins, lcms2, - libkdcraw, libkipi, phonon, qtimageformats, qtsvg, qtx11extras + exiv2, lcms2, + baloo, kactivities, kdelibs4support, kio, kipi-plugins, libkdcraw, libkipi, + phonon, qtimageformats, qtsvg, qtx11extras }: -let - unwrapped = - kdeApp { - name = "gwenview"; - meta = { - license = with lib.licenses; [ gpl2 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - baloo kactivities kdelibs4support kio exiv2 lcms2 libkdcraw - libkipi phonon qtimageformats qtsvg qtx11extras - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/gwenview" ]; - paths = [ kipi-plugins ]; +mkDerivation { + name = "gwenview"; + meta = { + license = with lib.licenses; [ gpl2 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + baloo exiv2 kactivities kdelibs4support kio libkdcraw lcms2 libkipi phonon + qtimageformats qtsvg qtx11extras + ]; + propagatedUserEnvPkgs = [ kipi-plugins ]; } diff --git a/pkgs/applications/kde/k3b.nix b/pkgs/applications/kde/k3b.nix index d1cd33a5208..e1f1132a08f 100644 --- a/pkgs/applications/kde/k3b.nix +++ b/pkgs/applications/kde/k3b.nix @@ -1,41 +1,41 @@ -{ kdeApp, lib, kdeWrapper, extra-cmake-modules +{ mkDerivation, lib +, extra-cmake-modules, kdoctools, makeWrapper , qtwebkit -, libkcddb, kcmutils, kdoctools, kfilemetadata, knewstuff, knotifyconfig, solid, kxmlgui +, libkcddb, kcmutils, kfilemetadata, knewstuff, knotifyconfig, solid, kxmlgui , flac, lame, libmad, libmpcdec, libvorbis , libsamplerate, libsndfile, taglib , cdparanoia, cdrdao, cdrtools, dvdplusrwtools, libburn, libdvdcss, libdvdread, vcdimager , ffmpeg, libmusicbrainz2, normalize, sox, transcode }: -let - unwrapped = - kdeApp { - name = "k3b"; - meta = with lib; { - license = with licenses; [ gpl2Plus ]; - maintainers = with maintainers; [ sander phreedom ]; - platforms = platforms.linux; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - # qt - qtwebkit - # kde - libkcddb kcmutils kfilemetadata knewstuff knotifyconfig solid kxmlgui - # formats - flac lame libmad libmpcdec libvorbis - # sound utilities - libsamplerate libsndfile taglib - # cd/dvd - cdparanoia libdvdcss libdvdread - # others - ffmpeg libmusicbrainz2 - ]; - enableParallelBuilding = true; - }; - -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/k3b" ]; - paths = [ cdrdao cdrtools dvdplusrwtools libburn normalize sox transcode vcdimager ]; +mkDerivation { + name = "k3b"; + meta = with lib; { + license = with licenses; [ gpl2Plus ]; + maintainers = with maintainers; [ sander phreedom ]; + platforms = platforms.linux; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools makeWrapper ]; + propagatedBuildInputs = [ + # qt + qtwebkit + # kde + libkcddb kcmutils kfilemetadata knewstuff knotifyconfig solid kxmlgui + # formats + flac lame libmad libmpcdec libvorbis + # sound utilities + libsamplerate libsndfile taglib + # cd/dvd + cdparanoia libdvdcss libdvdread + # others + ffmpeg libmusicbrainz2 + ]; + postFixup = + let k3bPath = lib.makeBinPath [ + cdrdao cdrtools dvdplusrwtools libburn normalize sox transcode + vcdimager + ]; + in '' + wrapProgram "$out/bin/k3b" --prefix PATH : "${k3bPath}" + ''; } diff --git a/pkgs/applications/kde/kate.nix b/pkgs/applications/kde/kate.nix index cd320afd8d3..e6b4f6b6bdd 100644 --- a/pkgs/applications/kde/kate.nix +++ b/pkgs/applications/kde/kate.nix @@ -1,5 +1,5 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kactivities, kconfig, kcrash, kdbusaddons, kguiaddons, kiconthemes, ki18n, kinit, kio, kitemmodels, kjobwidgets, knewstuff, knotifications, konsole, @@ -7,26 +7,19 @@ plasma-framework, qtscript, threadweaver }: -let - unwrapped = - kdeApp { - name = "kate"; - meta = { - license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kactivities ki18n kio ktexteditor kwindowsystem plasma-framework - qtscript kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts - kxmlgui kdbusaddons kwallet kitemmodels knotifications threadweaver - knewstuff libgit2 - ]; - }; -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/kate" "bin/kwrite" ]; - paths = [ konsole.unwrapped ]; +mkDerivation { + name = "kate"; + meta = { + license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ libgit2 ]; + propagatedBuildInputs = [ + kactivities ki18n kio ktexteditor kwindowsystem plasma-framework + qtscript kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts + kxmlgui kdbusaddons kwallet kitemmodels knotifications threadweaver + knewstuff + ]; + propagatedUserEnvPkgs = [ konsole ]; } diff --git a/pkgs/applications/kde/kcachegrind.nix b/pkgs/applications/kde/kcachegrind.nix index d43de1fdc36..a8833cfbf59 100644 --- a/pkgs/applications/kde/kcachegrind.nix +++ b/pkgs/applications/kde/kcachegrind.nix @@ -1,28 +1,17 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kio, ki18n, perl, python, php }: -kdeWrapper { - unwrapped = kdeApp { - name = "kcachegrind"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ orivej ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - buildInputs = [ perl python php kio ki18n ]; - enableParallelBuilding = true; +mkDerivation { + name = "kcachegrind"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ orivej ]; }; - - targets = [ - "bin/kcachegrind" - "bin/dprof2calltree" # perl - "bin/hotshot2calltree" # python - "bin/memprof2calltree" # perl - "bin/op2calltree" # perl - "bin/pprof2calltree" # php - ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ kio ]; + buildInputs = [ perl python php ki18n ]; } diff --git a/pkgs/applications/kde/kcalc.nix b/pkgs/applications/kde/kcalc.nix index 8ec7591460e..856da42c835 100644 --- a/pkgs/applications/kde/kcalc.nix +++ b/pkgs/applications/kde/kcalc.nix @@ -1,24 +1,18 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kconfig, kconfigwidgets, kguiaddons, kinit, knotifications, gmp }: -let - unwrapped = - kdeApp { - name = "kcalc"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = [ lib.maintainers.fridh ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - gmp kconfig kconfigwidgets kguiaddons kinit knotifications - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kcalc" ]; +mkDerivation { + name = "kcalc"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = [ lib.maintainers.fridh ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ gmp ]; + propagatedBuildInputs = [ + kconfig kconfigwidgets kguiaddons kinit knotifications + ]; } diff --git a/pkgs/applications/kde/kcolorchooser.nix b/pkgs/applications/kde/kcolorchooser.nix index c1266009b68..186505a050c 100644 --- a/pkgs/applications/kde/kcolorchooser.nix +++ b/pkgs/applications/kde/kcolorchooser.nix @@ -1,21 +1,16 @@ { - kdeApp, lib, kdeWrapper, - extra-cmake-modules, ki18n, kwidgetsaddons, kxmlgui + mkDerivation, lib, + extra-cmake-modules, + ki18n, kwidgetsaddons, kxmlgui }: -let - unwrapped = - kdeApp { - name = "kcolorchooser"; - meta = { - license = with lib.licenses; [ mit ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ ki18n kwidgetsaddons kxmlgui ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kcolorchooser" ]; +mkDerivation { + name = "kcolorchooser"; + meta = { + license = with lib.licenses; [ mit ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ ki18n ]; + propagatedBuildInputs = [ kwidgetsaddons kxmlgui ]; } diff --git a/pkgs/applications/kde/kcontacts.nix b/pkgs/applications/kde/kcontacts.nix index 5143df60ef4..96828af9d17 100644 --- a/pkgs/applications/kde/kcontacts.nix +++ b/pkgs/applications/kde/kcontacts.nix @@ -1,15 +1,15 @@ { - kdeApp, lib, - extra-cmake-modules, ki18n, - kcoreaddons, kconfig, kcodecs + mkDerivation, lib, + extra-cmake-modules, + kcoreaddons, kconfig, kcodecs, ki18n, qtbase, }: -kdeApp { +mkDerivation { name = "kcontacts"; meta = { license = [ lib.licenses.lgpl21 ]; maintainers = [ lib.maintainers.ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules ki18n ]; - buildInputs = [ kcoreaddons kconfig kcodecs ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ kcoreaddons kconfig kcodecs ki18n qtbase ]; } diff --git a/pkgs/applications/kde/kde-locale-4.nix b/pkgs/applications/kde/kde-locale-4.nix index e83794c60d8..daf0a55b19e 100644 --- a/pkgs/applications/kde/kde-locale-4.nix +++ b/pkgs/applications/kde/kde-locale-4.nix @@ -1,8 +1,8 @@ name: args: -{ kdeApp, automoc4, cmake, gettext, kdelibs, perl }: +{ mkDerivation, automoc4, cmake, gettext, kdelibs, perl }: -kdeApp (args // { +mkDerivation (args // { sname = "kde-l10n-${name}"; name = "kde-l10n-${name}-qt4"; diff --git a/pkgs/applications/kde/kde-locale-5.nix b/pkgs/applications/kde/kde-locale-5.nix index 772ebe37e44..76d601cbdc0 100644 --- a/pkgs/applications/kde/kde-locale-5.nix +++ b/pkgs/applications/kde/kde-locale-5.nix @@ -1,8 +1,8 @@ name: args: -{ kdeApp, cmake, extra-cmake-modules, gettext, kdoctools }: +{ mkDerivation, cmake, extra-cmake-modules, gettext, kdoctools }: -kdeApp (args // { +mkDerivation (args // { sname = "kde-l10n-${name}"; name = "kde-l10n-${name}-qt5"; diff --git a/pkgs/applications/kde/kdegraphics-mobipocket.nix b/pkgs/applications/kde/kdegraphics-mobipocket.nix index e50c92f8884..09f761df851 100644 --- a/pkgs/applications/kde/kdegraphics-mobipocket.nix +++ b/pkgs/applications/kde/kdegraphics-mobipocket.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, kio }: -kdeApp { +mkDerivation { name = "kdegraphics-mobipocket"; meta = { license = [ lib.licenses.gpl2Plus ]; diff --git a/pkgs/applications/kde/kdegraphics-thumbnailers.nix b/pkgs/applications/kde/kdegraphics-thumbnailers.nix index 5aa974a9c96..3302681bd85 100644 --- a/pkgs/applications/kde/kdegraphics-thumbnailers.nix +++ b/pkgs/applications/kde/kdegraphics-thumbnailers.nix @@ -1,9 +1,9 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, kio, libkexiv2, libkdcraw }: -kdeApp { +mkDerivation { name = "kdegraphics-thumbnailers"; meta = { license = [ lib.licenses.lgpl21 ]; diff --git a/pkgs/applications/kde/kdelibs/default.nix b/pkgs/applications/kde/kdelibs/default.nix index cae1b9b7e7f..e3abe89eade 100644 --- a/pkgs/applications/kde/kdelibs/default.nix +++ b/pkgs/applications/kde/kdelibs/default.nix @@ -1,12 +1,12 @@ { - kdeApp, lib, + mkDerivation, lib, automoc4, bison, cmake, flex, libxslt, perl, pkgconfig, shared_mime_info, attica, attr, avahi, docbook_xml_dtd_42, docbook_xsl, giflib, ilmbase, libdbusmenu_qt, libjpeg, libxml2, phonon, polkit_qt4, qca2, qt4, shared_desktop_ontologies, soprano, strigi, udev, xz, pcre, fetchpatch }: -kdeApp { +mkDerivation { name = "kdelibs"; outputs = [ "out" "dev" ]; diff --git a/pkgs/applications/kde/kdenetwork-filesharing.nix b/pkgs/applications/kde/kdenetwork-filesharing.nix index 20f81563c3b..62176f3f3bb 100644 --- a/pkgs/applications/kde/kdenetwork-filesharing.nix +++ b/pkgs/applications/kde/kdenetwork-filesharing.nix @@ -1,10 +1,10 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, kdoctools, kcoreaddons, ki18n, kio, kwidgetsaddons, samba }: -kdeApp { +mkDerivation { name = "kdenetwork-filesharing"; meta = { license = [ lib.licenses.gpl2 lib.licenses.lgpl21 ]; diff --git a/pkgs/applications/kde/kdenlive.nix b/pkgs/applications/kde/kdenlive.nix index e543a3d84bf..854e346e290 100644 --- a/pkgs/applications/kde/kdenlive.nix +++ b/pkgs/applications/kde/kdenlive.nix @@ -1,5 +1,4 @@ -{ kdeApp -, kdeWrapper +{ mkDerivation , lib , extra-cmake-modules , kdoctools @@ -31,8 +30,7 @@ , qtquickcontrols }: -let -unwrapped = kdeApp { +mkDerivation { name = "kdenlive"; patches = [ ./kdenlive-cmake-concurrent-module.patch @@ -42,13 +40,14 @@ unwrapped = kdeApp { kdoctools ]; buildInputs = [ - qtscript kconfig kcrash + kdbusaddons + kfilemetadata kguiaddons + ki18n kiconthemes kinit - kdbusaddons knotifications knewstuff karchive @@ -56,30 +55,19 @@ unwrapped = kdeApp { kplotting ktextwidgets mlt + phonon-backend-gstreamer + qtquickcontrols + qtscript shared_mime_info libv4l ffmpeg ]; - propagatedBuildInputs = [ - kactivities - ki18n - kio - kio-extras - kwindowsystem - kfilemetadata - plasma-framework - phonon-backend-gstreamer - qtquickcontrols - ]; - enableParallelBuilding = true; + postPatch = + # Module Qt5::Concurrent must be included in `find_package` before it is used. + '' + sed -i CMakeLists.txt -e '/find_package(Qt5 REQUIRED/ s|)| Concurrent)|' + ''; meta = { license = with lib.licenses; [ gpl2Plus ]; }; -}; -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/kdenlive" ]; - paths = [ kinit ]; } diff --git a/pkgs/applications/kde/kdf.nix b/pkgs/applications/kde/kdf.nix index 97e74eb2e12..333fea3df53 100644 --- a/pkgs/applications/kde/kdf.nix +++ b/pkgs/applications/kde/kdf.nix @@ -1,24 +1,15 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kcmutils }: -let - unwrapped = - kdeApp { - name = "kdf"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = [ lib.maintainers.peterhoeg ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kcmutils - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kdf" ]; +mkDerivation { + name = "kdf"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = [ lib.maintainers.peterhoeg ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ kcmutils ]; } diff --git a/pkgs/applications/kde/kgpg.nix b/pkgs/applications/kde/kgpg.nix index 58e9cb0d1e9..ca495a1ae26 100644 --- a/pkgs/applications/kde/kgpg.nix +++ b/pkgs/applications/kde/kgpg.nix @@ -1,21 +1,22 @@ { - kdeApp, lib, makeQtWrapper, - extra-cmake-modules, kdoctools, ki18n, - akonadi-contacts, gnupg1, gpgme, karchive, kcodecs, kcontacts, kcoreaddons, kcrash, - kdbusaddons, kiconthemes, kjobwidgets, kio, knotifications, kservice, + mkDerivation, lib, + extra-cmake-modules, kdoctools, ki18n, makeWrapper, + akonadi-contacts, gnupg1, gpgme, karchive, kcodecs, kcontacts, kcoreaddons, + kcrash, kdbusaddons, kiconthemes, kjobwidgets, kio, knotifications, kservice, ktextwidgets, kxmlgui, kwidgetsaddons, kwindowsystem }: -kdeApp { +mkDerivation { name = "kgpg"; - nativeBuildInputs = [ extra-cmake-modules kdoctools ki18n ]; - buildInputs = [ - akonadi-contacts gnupg1 gpgme karchive kcodecs kcontacts kcoreaddons kcrash kdbusaddons + nativeBuildInputs = [ extra-cmake-modules kdoctools makeWrapper ]; + buildInputs = [ gnupg1 gpgme ki18n ]; + propagatedBuildInputs = [ + akonadi-contacts karchive kcodecs kcontacts kcoreaddons kcrash kdbusaddons kiconthemes kjobwidgets kio knotifications kservice ktextwidgets kxmlgui - kwidgetsaddons kwindowsystem makeQtWrapper + kwidgetsaddons kwindowsystem ]; - postInstall = '' - wrapQtProgram $out/bin/kgpg --suffix PATH : ${lib.makeBinPath [ gnupg1 ]} + postFixup = '' + wrapProgram "$out/bin/kgpg" --prefix PATH : "${lib.makeBinPath [ gnupg1 ]}" ''; meta = { license = [ lib.licenses.gpl2 ]; diff --git a/pkgs/applications/kde/khelpcenter.nix b/pkgs/applications/kde/khelpcenter.nix index 0579faa72a0..db68cec976e 100644 --- a/pkgs/applications/kde/khelpcenter.nix +++ b/pkgs/applications/kde/khelpcenter.nix @@ -1,22 +1,16 @@ { - kdeApp, kdeWrapper, + mkDerivation, extra-cmake-modules, kdoctools, grantlee, kconfig, kcoreaddons, kdbusaddons, ki18n, kinit, kcmutils, kdelibs4support, khtml, kservice, xapian }: -let - unwrapped = - kdeApp { - name = "khelpcenter"; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - buildInputs = [ - grantlee kdelibs4support khtml ki18n kconfig kcoreaddons kdbusaddons - kinit kcmutils kservice xapian - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/khelpcenter" ]; +mkDerivation { + name = "khelpcenter"; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ ki18n xapian ]; + propagatedBuildInputs = [ + grantlee kdelibs4support khtml kconfig kcoreaddons kdbusaddons + kinit kcmutils kservice + ]; } diff --git a/pkgs/applications/kde/kig.nix b/pkgs/applications/kde/kig.nix index 9f38079316f..f2a1d275f6e 100644 --- a/pkgs/applications/kde/kig.nix +++ b/pkgs/applications/kde/kig.nix @@ -1,26 +1,19 @@ { - kdeApp, lib, kdeWrapper - , extra-cmake-modules, kdoctools, kparts - , qtsvg, qtxmlpatterns, ktexteditor, boost + mkDerivation, lib, + extra-cmake-modules, kdoctools, + kparts, qtsvg, qtxmlpatterns, ktexteditor, boost }: -let - unwrapped = - kdeApp { - name = "kig"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ raskin ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - buildInputs = [ - kparts qtsvg qtxmlpatterns ktexteditor boost - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kig" ]; +mkDerivation { + name = "kig"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ raskin ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ boost ]; + propagatedBuildInputs = [ + kparts qtsvg qtxmlpatterns ktexteditor + ]; } - diff --git a/pkgs/applications/kde/kio-extras.nix b/pkgs/applications/kde/kio-extras.nix index 77f795167fc..50709a7ddef 100644 --- a/pkgs/applications/kde/kio-extras.nix +++ b/pkgs/applications/kde/kio-extras.nix @@ -1,12 +1,12 @@ { - kdeApp, lib, extra-cmake-modules, kdoctools, shared_mime_info, + mkDerivation, lib, extra-cmake-modules, kdoctools, shared_mime_info, exiv2, kactivities, karchive, kbookmarks, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, kguiaddons, kdnssd, kiconthemes, ki18n, kio, khtml, kdelibs4support, kpty, libmtp, libssh, openexr, ilmbase, openslp, phonon, qtsvg, samba, solid }: -kdeApp { +mkDerivation { name = "kio-extras"; meta = { license = with lib.licenses; [ gpl2 lgpl21 ]; diff --git a/pkgs/applications/kde/kmime.nix b/pkgs/applications/kde/kmime.nix index c17b3fdcd8e..b14e0abcc3f 100644 --- a/pkgs/applications/kde/kmime.nix +++ b/pkgs/applications/kde/kmime.nix @@ -1,15 +1,15 @@ { - kdeApp, lib, + mkDerivation, lib, extra-cmake-modules, ki18n, - kcodecs + kcodecs, qtbase, }: -kdeApp { +mkDerivation { name = "kmime"; meta = { license = [ lib.licenses.lgpl21 ]; maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ki18n ]; - buildInputs = [ kcodecs ]; + buildInputs = [ kcodecs qtbase ]; } diff --git a/pkgs/applications/kde/kmix.nix b/pkgs/applications/kde/kmix.nix index 6ab653cfce0..058fd8178c4 100644 --- a/pkgs/applications/kde/kmix.nix +++ b/pkgs/applications/kde/kmix.nix @@ -1,30 +1,23 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kglobalaccel, kxmlgui, kcoreaddons, kdelibs4support, plasma-framework, libpulseaudio, alsaLib, libcanberra_kde }: -let - unwrapped = - kdeApp { - name = "kmix"; - meta = { - license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; - maintainers = [ lib.maintainers.rongcuid ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - buildInputs = [ libpulseaudio alsaLib libcanberra_kde ]; - propagatedBuildInputs = [ - kglobalaccel kxmlgui kcoreaddons kdelibs4support - plasma-framework - ]; - cmakeFlags = [ - "-DKMIX_KF5_BUILD=1" - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kmix" ]; +mkDerivation { + name = "kmix"; + meta = { + license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; + maintainers = [ lib.maintainers.rongcuid ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ libpulseaudio alsaLib libcanberra_kde ]; + propagatedBuildInputs = [ + kglobalaccel kxmlgui kcoreaddons kdelibs4support + plasma-framework + ]; + cmakeFlags = [ + "-DKMIX_KF5_BUILD=1" + ]; } diff --git a/pkgs/applications/kde/kolourpaint.nix b/pkgs/applications/kde/kolourpaint.nix index 75d5b6fca65..db4cb75cc35 100644 --- a/pkgs/applications/kde/kolourpaint.nix +++ b/pkgs/applications/kde/kolourpaint.nix @@ -1,28 +1,17 @@ { lib -, kdeApp -, kdeWrapper +, mkDerivation , extra-cmake-modules , kdoctools , kdelibs4support , libkexiv2 }: -let - unwrapped = - kdeApp { - name = "kolourpaint"; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kdelibs4support - libkexiv2 - ]; - - meta = { - maintainers = [ lib.maintainers.fridh ]; - license = with lib.licenses; [ gpl2 ]; - }; - }; -in kdeWrapper { - inherit unwrapped; - targets = ["bin/kolourpaint"]; -} \ No newline at end of file +mkDerivation { + name = "kolourpaint"; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ kdelibs4support libkexiv2 ]; + meta = { + maintainers = [ lib.maintainers.fridh ]; + license = with lib.licenses; [ gpl2 ]; + }; +} diff --git a/pkgs/applications/kde/kompare.nix b/pkgs/applications/kde/kompare.nix index 660090dc84a..cf2fa2e6a10 100644 --- a/pkgs/applications/kde/kompare.nix +++ b/pkgs/applications/kde/kompare.nix @@ -1,21 +1,14 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kparts, ktexteditor, kwidgetsaddons, libkomparediff2 }: -let - unwrapped = - kdeApp { - name = "kompare"; - meta = { license = with lib.licenses; [ gpl2 ]; }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kparts ktexteditor kwidgetsaddons libkomparediff2 - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kompare" ]; +mkDerivation { + name = "kompare"; + meta = { license = with lib.licenses; [ gpl2 ]; }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ + kparts ktexteditor kwidgetsaddons libkomparediff2 + ]; } diff --git a/pkgs/applications/kde/konsole.nix b/pkgs/applications/kde/konsole.nix index 15b6373bdb0..bd026c6f039 100644 --- a/pkgs/applications/kde/konsole.nix +++ b/pkgs/applications/kde/konsole.nix @@ -1,5 +1,5 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons, ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications, @@ -7,24 +7,17 @@ kwindowsystem, kxmlgui, qtscript }: -let - unwrapped = - kdeApp { - name = "konsole"; - meta = { - license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kdelibs4support ki18n kwindowsystem qtscript kbookmarks kcompletion - kconfig kconfigwidgets kcoreaddons kguiaddons kiconthemes kinit kio - knotifications knotifyconfig kparts kpty kservice ktextwidgets - kwidgetsaddons kxmlgui - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/konsole" ]; +mkDerivation { + name = "konsole"; + meta = { + license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ ki18n ]; + propagatedBuildInputs = [ + kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons kdelibs4support + kguiaddons kiconthemes kinit kio knotifications knotifyconfig kparts kpty + kservice ktextwidgets kwidgetsaddons kwindowsystem kxmlgui qtscript + ]; } diff --git a/pkgs/applications/kde/krfb.nix b/pkgs/applications/kde/krfb.nix index ef5530be6fa..0f4aecb83d4 100644 --- a/pkgs/applications/kde/krfb.nix +++ b/pkgs/applications/kde/krfb.nix @@ -1,22 +1,16 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kdelibs4support, kdnssd, libvncserver, libXtst }: -let - unwrapped = - kdeApp { - name = "krfb"; - meta = { - license = with lib.licenses; [ gpl2 fdl12 ]; - maintainers = with lib.maintainers; [ jerith666 ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kdelibs4support kdnssd libvncserver libXtst ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/krfb" ]; +mkDerivation { + name = "krfb"; + meta = { + license = with lib.licenses; [ gpl2 fdl12 ]; + maintainers = with lib.maintainers; [ jerith666 ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ libvncserver libXtst ]; + propagatedBuildInputs = [ kdelibs4support kdnssd ]; } diff --git a/pkgs/applications/kde/kwalletmanager.nix b/pkgs/applications/kde/kwalletmanager.nix index afa870d90a5..e39e7e5157d 100644 --- a/pkgs/applications/kde/kwalletmanager.nix +++ b/pkgs/applications/kde/kwalletmanager.nix @@ -1,6 +1,5 @@ { lib -, kdeApp -, kdeWrapper +, mkDerivation , extra-cmake-modules , kdoctools , kauth @@ -9,28 +8,19 @@ , kcoreaddons , kdbusaddons , kdelibs4support +, kwallet , kxmlgui }: -let - unwrapped = kdeApp { - name = "kwalletmanager"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ fridh ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kauth - kcmutils - kconfigwidgets - kcoreaddons - kdbusaddons - kdelibs4support - kxmlgui - ]; +mkDerivation { + name = "kwalletmanager"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ fridh ]; }; -in kdeWrapper { - inherit unwrapped; - targets = ["bin/kwalletmanager5"]; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + kauth kcmutils kconfigwidgets kcoreaddons kdbusaddons kdelibs4support + kwallet kxmlgui + ]; } diff --git a/pkgs/applications/kde/libkcddb.nix b/pkgs/applications/kde/libkcddb.nix index 3d05714e824..edd9732d051 100644 --- a/pkgs/applications/kde/libkcddb.nix +++ b/pkgs/applications/kde/libkcddb.nix @@ -1,8 +1,8 @@ -{ kdeApp, lib, extra-cmake-modules, qtbase, kdoctools +{ mkDerivation, lib, extra-cmake-modules, qtbase, kdoctools , kcodecs, ki18n, kio, kwidgetsaddons , libmusicbrainz5 }: -kdeApp { +mkDerivation { name = "libkcddb"; meta = with lib; { license = with licenses; [ gpl2 lgpl21 bsd3 ]; @@ -14,5 +14,4 @@ kdeApp { kcodecs ki18n kio kwidgetsaddons libmusicbrainz5 ]; - enableParallelBuilding = true; } diff --git a/pkgs/applications/kde/libkdcraw.nix b/pkgs/applications/kde/libkdcraw.nix index 179e9f414dc..383bd3b6703 100644 --- a/pkgs/applications/kde/libkdcraw.nix +++ b/pkgs/applications/kde/libkdcraw.nix @@ -1,6 +1,6 @@ -{ kdeApp, lib, extra-cmake-modules, libraw, qtbase }: +{ mkDerivation, lib, extra-cmake-modules, libraw, qtbase }: -kdeApp { +mkDerivation { name = "libkdcraw"; meta = { license = with lib.licenses; [ gpl2 lgpl21 bsd3 ]; diff --git a/pkgs/applications/kde/libkexiv2.nix b/pkgs/applications/kde/libkexiv2.nix index 0991c5df5ab..816d4168967 100644 --- a/pkgs/applications/kde/libkexiv2.nix +++ b/pkgs/applications/kde/libkexiv2.nix @@ -1,6 +1,6 @@ -{ kdeApp, lib, exiv2, extra-cmake-modules, qtbase }: +{ mkDerivation, lib, exiv2, extra-cmake-modules, qtbase }: -kdeApp { +mkDerivation { name = "libkexiv2"; meta = { license = with lib.licenses; [ gpl2 lgpl21 bsd3 ]; diff --git a/pkgs/applications/kde/libkipi.nix b/pkgs/applications/kde/libkipi.nix index 32eeb171ff8..3a28d8c2e8c 100644 --- a/pkgs/applications/kde/libkipi.nix +++ b/pkgs/applications/kde/libkipi.nix @@ -1,6 +1,6 @@ -{ kdeApp, lib, extra-cmake-modules, kconfig, ki18n, kservice, kxmlgui }: +{ mkDerivation, lib, extra-cmake-modules, kconfig, ki18n, kservice, kxmlgui }: -kdeApp { +mkDerivation { name = "libkipi"; meta = { license = with lib.licenses; [ gpl2 lgpl21 bsd3 ]; diff --git a/pkgs/applications/kde/libkomparediff2.nix b/pkgs/applications/kde/libkomparediff2.nix index aacc89a0efe..52aa2b10e24 100644 --- a/pkgs/applications/kde/libkomparediff2.nix +++ b/pkgs/applications/kde/libkomparediff2.nix @@ -1,6 +1,6 @@ -{ kdeApp, lib, extra-cmake-modules, ki18n, kxmlgui, kcodecs, kio }: +{ mkDerivation, lib, extra-cmake-modules, ki18n, kxmlgui, kcodecs, kio }: -kdeApp { +mkDerivation { name = "libkomparediff2"; nativeBuildInputs = [ extra-cmake-modules ]; propagatedBuildInputs = [ kcodecs ki18n kxmlgui kio ]; diff --git a/pkgs/applications/kde/marble.nix b/pkgs/applications/kde/marble.nix index 5322c66b01d..1217c29032b 100644 --- a/pkgs/applications/kde/marble.nix +++ b/pkgs/applications/kde/marble.nix @@ -1,28 +1,16 @@ -{ kdeApp, lib, kdeWrapper +{ mkDerivation, lib , extra-cmake-modules, kdoctools , qtscript, qtsvg, qtquickcontrols, qtwebkit , krunner, shared_mime_info, kparts, knewstuff , gpsd, perl }: -let - unwrapped = - kdeApp { - name = "marble"; - meta.license = with lib.licenses; [ lgpl21 gpl3 ]; - - nativeBuildInputs = [ extra-cmake-modules kdoctools perl ]; - propagatedBuildInputs = [ - qtscript qtsvg qtquickcontrols qtwebkit shared_mime_info - krunner kparts knewstuff - gpsd - ]; - - enableParallelBuilding = true; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/marble-qt" "bin/marble" ]; - paths = [ unwrapped ]; +mkDerivation { + name = "marble"; + meta.license = with lib.licenses; [ lgpl21 gpl3 ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools perl ]; + propagatedBuildInputs = [ + qtscript qtsvg qtquickcontrols qtwebkit shared_mime_info krunner kparts + knewstuff gpsd + ]; } diff --git a/pkgs/applications/kde/okteta.nix b/pkgs/applications/kde/okteta.nix index 59520e28532..deeffa3207b 100644 --- a/pkgs/applications/kde/okteta.nix +++ b/pkgs/applications/kde/okteta.nix @@ -1,26 +1,18 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, kconfig, kinit, kcmutils, kconfigwidgets, knewstuff, kparts, qca-qt5 }: -let - unwrapped = - kdeApp { - name = "okteta"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ peterhoeg ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kconfig kinit - kcmutils kconfigwidgets knewstuff kparts qca-qt5 - ]; - }; - -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/okteta" ]; +mkDerivation { + name = "okteta"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ peterhoeg ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedBuildInputs = [ + kconfig kinit kcmutils kconfigwidgets knewstuff kparts qca-qt5 + ]; } diff --git a/pkgs/applications/kde/okular.nix b/pkgs/applications/kde/okular.nix index f5b3e38ca7c..99b69f45e1e 100644 --- a/pkgs/applications/kde/okular.nix +++ b/pkgs/applications/kde/okular.nix @@ -1,31 +1,25 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, djvulibre, ebook_tools, kactivities, karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts, kpty, kwallet, kwindowsystem, libkexiv2, - libspectre, poppler, qca-qt5, qtdeclarative, qtsvg, threadweaver + libspectre, phonon, poppler, qca-qt5, qtdeclarative, qtsvg, threadweaver }: -let - unwrapped = kdeApp { - name = "okular"; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - djvulibre ebook_tools kactivities karchive kbookmarks kcompletion kconfig - kconfigwidgets kcoreaddons kdbusaddons kdegraphics-mobipocket kiconthemes - kjs khtml kio kparts kpty kwallet kwindowsystem libkexiv2 libspectre poppler - qca-qt5 qtdeclarative qtsvg threadweaver - ]; - meta = { - platforms = lib.platforms.linux; - homepage = "http://www.kde.org"; - license = with lib.licenses; [ gpl2 lgpl21 fdl12 bsd3 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; +mkDerivation { + name = "okular"; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + djvulibre ebook_tools kactivities karchive kbookmarks kcompletion kconfig kconfigwidgets + kcoreaddons kdbusaddons kdegraphics-mobipocket kiconthemes kjs khtml kio + kparts kpty kwallet kwindowsystem libkexiv2 libspectre phonon poppler + qca-qt5 qtdeclarative qtsvg threadweaver + ]; + meta = { + platforms = lib.platforms.linux; + homepage = "http://www.kde.org"; + license = with lib.licenses; [ gpl2 lgpl21 fdl12 bsd3 ]; + maintainers = [ lib.maintainers.ttuegel ]; }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/okular" ]; } diff --git a/pkgs/applications/kde/print-manager.nix b/pkgs/applications/kde/print-manager.nix index 0a3d311eb27..085b53de0f3 100644 --- a/pkgs/applications/kde/print-manager.nix +++ b/pkgs/applications/kde/print-manager.nix @@ -1,20 +1,22 @@ { - kdeApp, lib, extra-cmake-modules, - cups, kconfig, kconfigwidgets, kdbusaddons, kiconthemes, ki18n, kcmutils, kio, + mkDerivation, lib, + extra-cmake-modules, + cups, ki18n, + kconfig, kconfigwidgets, kdbusaddons, kiconthemes, kcmutils, kio, knotifications, kwidgetsaddons, kwindowsystem, kitemviews, plasma-framework, qtdeclarative }: -kdeApp { +mkDerivation { name = "print-manager"; meta = { license = [ lib.licenses.gpl2 ]; maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ cups ki18n ]; propagatedBuildInputs = [ - cups kconfig kconfigwidgets kdbusaddons kiconthemes kcmutils knotifications - kwidgetsaddons kitemviews ki18n kio kwindowsystem plasma-framework - qtdeclarative + kconfig kconfigwidgets kdbusaddons kiconthemes kcmutils knotifications + kwidgetsaddons kitemviews kio kwindowsystem plasma-framework qtdeclarative ]; } diff --git a/pkgs/applications/kde/spectacle.nix b/pkgs/applications/kde/spectacle.nix index 30abfc23e83..db1bf2aee65 100644 --- a/pkgs/applications/kde/spectacle.nix +++ b/pkgs/applications/kde/spectacle.nix @@ -1,25 +1,20 @@ { - kdeApp, lib, kdeWrapper, + mkDerivation, lib, extra-cmake-modules, kdoctools, - kconfig, kcoreaddons, kdbusaddons, kdeclarative, ki18n, kio, kipi-plugins, + ki18n, xcb-util-cursor, + kconfig, kcoreaddons, kdbusaddons, kdeclarative, kio, kipi-plugins, knotifications, kscreen, kwidgetsaddons, kwindowsystem, kxmlgui, libkipi, - xcb-util-cursor + qtx11extras }: -let - unwrapped = - kdeApp { - name = "spectacle"; - meta = with lib; { maintainers = with maintainers; [ ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kconfig kcoreaddons kdbusaddons kdeclarative ki18n kio knotifications - kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi xcb-util-cursor - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/spectacle" ]; - paths = [ kipi-plugins ]; +mkDerivation { + name = "spectacle"; + meta = with lib; { maintainers = with maintainers; [ ttuegel ]; }; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ ki18n xcb-util-cursor ]; + propagatedBuildInputs = [ + kconfig kcoreaddons kdbusaddons kdeclarative kio knotifications + kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi qtx11extras + ]; + propagatedUserEnvPkgs = [ kipi-plugins ]; } diff --git a/pkgs/applications/misc/albert/default.nix b/pkgs/applications/misc/albert/default.nix index f3c011e3333..854408e6e3e 100644 --- a/pkgs/applications/misc/albert/default.nix +++ b/pkgs/applications/misc/albert/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, qtbase, qtsvg, qtx11extras, makeQtWrapper, muparser, cmake }: +{ mkDerivation, lib, fetchFromGitHub, qtbase, qtsvg, qtx11extras, muparser, cmake }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "albert-${version}"; version = "0.11.3"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0ddz6h1334b9kqy1lfi7qa21znm3l0b9h0d4s62llxdasv103jh5"; }; - nativeBuildInputs = [ cmake makeQtWrapper ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ qtbase qtsvg qtx11extras muparser ]; @@ -31,11 +31,7 @@ stdenv.mkDerivation rec { rm "$out/lib" ''; - fixupPhase = '' - wrapQtProgram $out/bin/albert - ''; - - meta = with stdenv.lib; { + meta = with lib; { homepage = https://albertlauncher.github.io/; description = "Desktop agnostic launcher"; license = licenses.gpl3Plus; diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 49c005cf739..5845fe85ccb 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, poppler_utils, pkgconfig, libpng -, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmakeHook, icu, sqlite +, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite , makeWrapper, unrarSupport ? false, chmlib, python2Packages, xz, libusb1, libmtp , xdg_utils, makeDesktopItem, wrapGAppsHook }: @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - nativeBuildInputs = [ makeWrapper pkgconfig qmakeHook ]; + nativeBuildInputs = [ makeWrapper pkgconfig qmake ]; buildInputs = [ poppler_utils libpng imagemagick libjpeg diff --git a/pkgs/applications/misc/cool-retro-term/default.nix b/pkgs/applications/misc/cool-retro-term/default.nix index 9ff27c74709..48e08be5474 100644 --- a/pkgs/applications/misc/cool-retro-term/default.nix +++ b/pkgs/applications/misc/cool-retro-term/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchgit, makeQtWrapper, qtbase, qtquick1, qmltermwidget, -qtquickcontrols, qtgraphicaleffects, qmakeHook }: +{ stdenv, fetchgit, qtbase, qtquick1, qmltermwidget, +qtquickcontrols, qtgraphicaleffects, qmake }: stdenv.mkDerivation rec { version = "1.0.0"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ''; buildInputs = [ qtbase qtquick1 qmltermwidget qtquickcontrols qtgraphicaleffects ]; - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ qmake ]; installFlags = [ "INSTALL_ROOT=$(out)" ]; @@ -25,8 +25,6 @@ stdenv.mkDerivation rec { mv $out/usr/share $out/share mv $out/usr/bin $out/bin rmdir $out/usr - - wrapQtProgram $out/bin/cool-retro-term ''; enableParallelBuilding = true; diff --git a/pkgs/applications/misc/cura/default.nix b/pkgs/applications/misc/cura/default.nix index ff18796e39d..e33edfb0a44 100644 --- a/pkgs/applications/misc/cura/default.nix +++ b/pkgs/applications/misc/cura/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, cmake, python3, qtbase, makeQtWrapper, curaengine }: +{ mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase, curaengine }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "cura-${version}"; version = "2.4.0"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase ]; propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial ]; - nativeBuildInputs = [ cmake python3.pkgs.wrapPython makeQtWrapper ]; + nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; cmakeFlags = [ "-DCMAKE_MODULE_PATH=${python3.pkgs.uranium}/share/cmake-${cmake.majorVersion}/Modules" ]; @@ -24,11 +24,9 @@ stdenv.mkDerivation rec { postFixup = '' wrapPythonPrograms - mv $out/bin/cura $out/bin/.cura-noqtpath - makeQtWrapper $out/bin/.cura-noqtpath $out/bin/cura ''; - meta = with stdenv.lib; { + meta = with lib; { description = "3D printer / slicing GUI built on top of the Uranium framework"; homepage = "https://github.com/Ultimaker/Cura"; license = licenses.agpl3; diff --git a/pkgs/applications/misc/golden-cheetah/default.nix b/pkgs/applications/misc/golden-cheetah/default.nix index d6da900656c..358d9dff44a 100644 --- a/pkgs/applications/misc/golden-cheetah/default.nix +++ b/pkgs/applications/misc/golden-cheetah/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl , qtbase, qtsvg, qtserialport, qtwebkit, qtmultimedia, qttools, qtconnectivity -, yacc, flex, zlib, config, qmakeHook, makeQtWrapper +, yacc, flex, zlib, config, qmake, makeWrapper }: stdenv.mkDerivation rec { name = "golden-cheetah-${version}"; @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { url = "https://github.com/GoldenCheetah/GoldenCheetah/archive/V${version}.tar.gz"; sha256 = "0fiz2pj155cd357kph50lc6rjyzwp045glfv4y68qls9j7m9ayaf"; }; - qtInputs = [ - qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools yacc flex zlib + buildInputs = [ + qtbase qtsvg qtserialport qtwebkit qtmultimedia qttools zlib qtconnectivity ]; - nativeBuildInputs = [ makeQtWrapper qmakeHook ] ++ qtInputs; + nativeBuildInputs = [ flex makeWrapper qmake yacc ]; preConfigure = '' cp src/gcconfig.pri.in src/gcconfig.pri cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp src/GoldenCheetah $out/bin - wrapQtProgram $out/bin/GoldenCheetah --set LD_LIBRARY_PATH "${zlib.out}/lib" + wrapProgram $out/bin/GoldenCheetah --set LD_LIBRARY_PATH "${zlib.out}/lib" runHook postInstall ''; diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix index be36eeceb6b..278c685b7cf 100644 --- a/pkgs/applications/misc/goldendict/default.nix +++ b/pkgs/applications/misc/goldendict/default.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, pkgconfig, libXtst, libvorbis, hunspell , libao, ffmpeg, libeb, lzo, xz, libtiff -, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmakeHook }: +, qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake }: stdenv.mkDerivation rec { + name = "goldendict-1.5.0.rc2"; src = fetchurl { url = "https://github.com/goldendict/goldendict/archive/1.5.0-RC2.tar.gz"; @@ -9,10 +10,12 @@ stdenv.mkDerivation rec { }; buildInputs = [ - pkgconfig qtbase qtsvg qtwebkit qtx11extras qttools libXtst libvorbis hunspell libao ffmpeg libeb - lzo xz libtiff qmakeHook + pkgconfig qtbase qtsvg qtwebkit qtx11extras qttools + libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff ]; + nativeBuildInputs = [ qmake ]; + qmakeFlags = [ "CONFIG+=zim_support" ]; meta = { diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index 42fc1e46e33..16147715705 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qmakeHook, qtbase, qttools, makeQtWrapper }: +{ stdenv, fetchFromGitHub, qmake, qtbase, qttools }: stdenv.mkDerivation rec { name = "gpxsee-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "17s1v6b1j7pi0yj554bd0cg14bl854gssp5gj2pl51rxji6zr0wp"; }; - nativeBuildInputs = [ qmakeHook qttools makeQtWrapper ]; + nativeBuildInputs = [ qmake qttools ]; preConfigure = '' substituteInPlace src/config.h --replace /usr/share/gpxsee $out/share/gpxsee @@ -20,7 +20,6 @@ stdenv.mkDerivation rec { preFixup = '' install -Dm755 GPXSee $out/bin/GPXSee - wrapQtProgram $out/bin/GPXSee mkdir -p $out/share/gpxsee cp pkg/maps.txt $out/share/gpxsee diff --git a/pkgs/applications/misc/kdeconnect/default.nix b/pkgs/applications/misc/kdeconnect/default.nix index 22c9cfc7e98..743a20b6bfc 100644 --- a/pkgs/applications/misc/kdeconnect/default.nix +++ b/pkgs/applications/misc/kdeconnect/default.nix @@ -2,7 +2,6 @@ , lib , fetchurl , extra-cmake-modules -, makeQtWrapper , kcmutils , kconfigwidgets , kdbusaddons @@ -35,14 +34,7 @@ stdenv.mkDerivation rec { libXtst ]; - nativeBuildInputs = [ - extra-cmake-modules - makeQtWrapper - ]; - - postInstall = '' - wrapQtProgram "$out/bin/kdeconnect-cli" - ''; + nativeBuildInputs = [ extra-cmake-modules ]; meta = { description = "KDE Connect provides several features to integrate your phone and your computer"; diff --git a/pkgs/applications/misc/krename/default.nix b/pkgs/applications/misc/krename/default.nix index c6baab21ee0..22cd14c1952 100644 --- a/pkgs/applications/misc/krename/default.nix +++ b/pkgs/applications/misc/krename/default.nix @@ -1,35 +1,30 @@ { - kdeDerivation, kdeWrapper, fetchFromGitHub, lib, - extra-cmake-modules, kdoctools, kconfig, kinit, kjsembed, - taglib, exiv2, podofo + mkDerivation, fetchFromGitHub, lib, + extra-cmake-modules, kdoctools, wrapGAppsHook, + kconfig, kinit, kjsembed, taglib, exiv2, podofo }: let pname = "krename"; version = "20170610"; - unwrapped = kdeDerivation rec { - name = "${pname}-${version}"; +in mkDerivation rec { + name = "${pname}-${version}"; - src = fetchFromGitHub { - owner = "KDE"; - repo = "krename"; - rev = "18000edfec52de0b417d575e14eb078b4bd7b2f3"; - sha256 = "0hsrlfrbi42jqqnkcz682c6yrfi3xpl299672knj22074wr6sv0j"; - }; - - meta = with lib; { - homepage = http://www.krename.net; - description = "A powerful batch renamer for KDE"; - inherit (kconfig.meta) platforms; - maintainers = with maintainers; [ peterhoeg ]; - }; - - buildInputs = [ taglib exiv2 podofo ]; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kconfig kinit kjsembed ]; + src = fetchFromGitHub { + owner = "KDE"; + repo = "krename"; + rev = "18000edfec52de0b417d575e14eb078b4bd7b2f3"; + sha256 = "0hsrlfrbi42jqqnkcz682c6yrfi3xpl299672knj22074wr6sv0j"; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/krename" ]; + meta = with lib; { + homepage = http://www.krename.net; + description = "A powerful batch renamer for KDE"; + inherit (kconfig.meta) platforms; + maintainers = with maintainers; [ peterhoeg ]; + }; + + buildInputs = [ taglib exiv2 podofo ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + propagatedBuildInputs = [ kconfig kinit kjsembed ]; } diff --git a/pkgs/applications/misc/krusader/default.nix b/pkgs/applications/misc/krusader/default.nix index c085d916d86..7f5dad62d26 100644 --- a/pkgs/applications/misc/krusader/default.nix +++ b/pkgs/applications/misc/krusader/default.nix @@ -1,33 +1,27 @@ { - kdeDerivation, kdeWrapper, fetchurl, lib, - extra-cmake-modules, kdoctools, + mkDerivation, fetchurl, lib, + extra-cmake-modules, kdoctools, wrapGAppsHook, kconfig, kinit, kparts }: let pname = "krusader"; version = "2.6.0"; - unwrapped = kdeDerivation rec { - name = "krusader-${version}"; +in mkDerivation rec { + name = "krusader-${version}"; - src = fetchurl { - url = "mirror://kde/stable/${pname}/${version}/${name}.tar.xz"; - sha256 = "0f9skfvp0hdml8qq6v22z9293ndijd8kwbpdj7wpvgd6mlya8qbh"; - }; - - meta = with lib; { - description = "Norton/Total Commander clone for KDE"; - license = licenses.gpl2; - homepage = http://www.krusader.org; - maintainers = with maintainers; [ sander ]; - }; - - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kconfig kinit kparts ]; - enableParallelBuilding = true; + src = fetchurl { + url = "mirror://kde/stable/${pname}/${version}/${name}.tar.xz"; + sha256 = "0f9skfvp0hdml8qq6v22z9293ndijd8kwbpdj7wpvgd6mlya8qbh"; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/krusader" ]; + meta = with lib; { + description = "Norton/Total Commander clone for KDE"; + license = licenses.gpl2; + homepage = http://www.krusader.org; + maintainers = with maintainers; [ sander ]; + }; + + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + propagatedBuildInputs = [ kconfig kinit kparts ]; } diff --git a/pkgs/applications/misc/latte-dock/default.nix b/pkgs/applications/misc/latte-dock/default.nix index cdde0beb827..1b2cf94d173 100644 --- a/pkgs/applications/misc/latte-dock/default.nix +++ b/pkgs/applications/misc/latte-dock/default.nix @@ -1,33 +1,26 @@ -{ stdenv, lib, cmake, xorg, plasma-framework, fetchFromGitHub, kdeWrapper }: +{ mkDerivation, lib, cmake, xorg, plasma-framework, fetchFromGitHub }: -let version = "0.6.0"; +let version = "0.6.0"; in - unwrapped = stdenv.mkDerivation { - name = "latte-dock-${version}"; +mkDerivation { + name = "latte-dock-${version}"; - src = fetchFromGitHub { - owner = "psifidotos"; - repo = "Latte-Dock"; - rev = "v${version}"; - sha256 = "1967hx4lavy96vvik8d5m2c6ycd2mlf9cmhrv40zr0784ni0ikyv"; - }; + src = fetchFromGitHub { + owner = "psifidotos"; + repo = "Latte-Dock"; + rev = "v${version}"; + sha256 = "1967hx4lavy96vvik8d5m2c6ycd2mlf9cmhrv40zr0784ni0ikyv"; + }; - buildInputs = [ plasma-framework xorg.libpthreadstubs xorg.libXdmcp ]; + buildInputs = [ plasma-framework xorg.libpthreadstubs xorg.libXdmcp ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ]; - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Dock-style app launcher based on Plasma frameworks"; - homepage = https://github.com/psifidotos/Latte-Dock; - license = licenses.gpl2; - platforms = platforms.unix; - maintainers = [ maintainers.benley ]; - }; - }; - -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/latte-dock" ]; + meta = with lib; { + description = "Dock-style app launcher based on Plasma frameworks"; + homepage = https://github.com/psifidotos/Latte-Dock; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = [ maintainers.benley ]; + }; } diff --git a/pkgs/applications/misc/openbrf/default.nix b/pkgs/applications/misc/openbrf/default.nix index 50c8fc7bcec..5016acfff12 100644 --- a/pkgs/applications/misc/openbrf/default.nix +++ b/pkgs/applications/misc/openbrf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, vcg, glew, qmakeHook, makeQtWrapper, mesa }: +{ stdenv, fetchFromGitHub, qtbase, vcg, glew, qmake, mesa }: stdenv.mkDerivation { @@ -12,9 +12,9 @@ stdenv.mkDerivation { }; buildInputs = [ qtbase vcg glew ]; - nativeBuildInputs = [ qmakeHook makeQtWrapper ]; enableParallelBuilding = true; + nativeBuildInputs = [ qmake ]; qmakeFlags = [ "openBrf.pro" ]; @@ -31,7 +31,7 @@ stdenv.mkDerivation { --set-rpath "${stdenv.lib.makeLibraryPath [ qtbase glew stdenv.cc.cc mesa ]}" \ $out/share/openBrf/openBrf - makeQtWrapper "$out/share/openBrf/openBrf" "$out/bin/openBrf" + ln -s "$out/share/openBrf/openBrf" "$out/bin/openBrf" ''; dontPatchELF = true; diff --git a/pkgs/applications/misc/qsyncthingtray/default.nix b/pkgs/applications/misc/qsyncthingtray/default.nix index d6aea74d997..671370252a7 100644 --- a/pkgs/applications/misc/qsyncthingtray/default.nix +++ b/pkgs/applications/misc/qsyncthingtray/default.nix @@ -1,10 +1,10 @@ -{ stdenv, lib, fetchFromGitHub, procps ? null +{ mkDerivation, stdenv, lib, fetchFromGitHub, procps ? null , qtbase, qtwebengine, qtwebkit -, cmake, makeQtWrapper +, cmake , syncthing, syncthing-inotify ? null , preferQWebView ? false }: -stdenv.mkDerivation rec { +mkDerivation rec { version = "0.5.7"; name = "qsyncthingtray-${version}"; @@ -16,8 +16,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtwebengine ] ++ lib.optional preferQWebView qtwebkit; - nativeBuildInputs = [ cmake makeQtWrapper ]; - enableParallelBuilding = true; + nativeBuildInputs = [ cmake ]; cmakeFlags = lib.optional preferQWebView "-DQST_BUILD_WEBKIT=1"; @@ -41,12 +40,11 @@ stdenv.mkDerivation rec { mkdir -p $out/bin install -m755 QSyncthingTray $out/bin/${qst} ln -s $out/bin/${qst} $out/bin/QSyncthingTray - wrapQtProgram $out/bin/qsyncthingtray runHook postInstall ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/sieren/QSyncthingTray/; description = "A Traybar Application for Syncthing written in C++"; longDescription = '' diff --git a/pkgs/applications/misc/qtpass/default.nix b/pkgs/applications/misc/qtpass/default.nix index 4cdb6591465..d300e411c94 100644 --- a/pkgs/applications/misc/qtpass/default.nix +++ b/pkgs/applications/misc/qtpass/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools, qmakeHook }: +{ stdenv, fetchFromGitHub, git, gnupg, pass, qtbase, qtsvg, qttools, qmake, makeWrapper }: stdenv.mkDerivation rec { name = "qtpass-${version}"; @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { buildInputs = [ git gnupg pass qtbase qtsvg qttools ]; - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ makeWrapper qmake ]; preConfigure = '' - qmakeFlags="$qmakeFlags CONFIG+=release DESTDIR=$out" + qmakeFlags="$qmakeFlags DESTDIR=$out" ''; installPhase = '' @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapQtProgram $out/bin/qtpass \ + wrapProgram $out/bin/qtpass \ --suffix PATH : ${git}/bin \ --suffix PATH : ${gnupg}/bin \ --suffix PATH : ${pass}/bin diff --git a/pkgs/applications/misc/redis-desktop-manager/default.nix b/pkgs/applications/misc/redis-desktop-manager/default.nix index 9d333da01cb..0ba850a3460 100644 --- a/pkgs/applications/misc/redis-desktop-manager/default.nix +++ b/pkgs/applications/misc/redis-desktop-manager/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchgit, pkgconfig , libssh2 , qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols , qtsvg, qttools, qtquick1 -, makeQtWrapper, qmakeHook +, qmake }: let @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { sha256 = "0a7xa39qp1q32zkypw32mm3wi8wbhxhvrm6l3xsa3k1jzih7hzxr"; }; - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ pkgconfig libssh2 qtbase qtdeclarative qtgraphicaleffects qtimageformats @@ -68,7 +68,6 @@ EOF mkdir -p $out/bin instdir="$srcdir/bin/linux/release" cp $instdir/rdm $out/bin - wrapQtProgram $out/bin/rdm ''; meta = with lib; { diff --git a/pkgs/applications/misc/twmn/default.nix b/pkgs/applications/misc/twmn/default.nix index c38b97b0e98..7ec3d66f31c 100644 --- a/pkgs/applications/misc/twmn/default.nix +++ b/pkgs/applications/misc/twmn/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, qmakeHook, pkgconfig, boost }: +{ fetchurl, stdenv, fetchgit, qtbase, qtx11extras, qmake, pkgconfig, boost }: stdenv.mkDerivation rec { name = "twmn-git-2014-09-23"; @@ -9,7 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1a68gka9gyxyzhc9rn8df59rzcdwkjw90cxp1kk0rdfp6svhxhsa"; }; - buildInputs = [ qtbase qtx11extras pkgconfig boost qmakeHook ]; + nativeBuildInputs = [ pkgconfig qmake ]; + buildInputs = [ qtbase qtx11extras boost ]; postPatch = '' sed -i s/-Werror// twmnd/twmnd.pro diff --git a/pkgs/applications/misc/xca/default.nix b/pkgs/applications/misc/xca/default.nix index 09da875e236..80ecbdeba77 100644 --- a/pkgs/applications/misc/xca/default.nix +++ b/pkgs/applications/misc/xca/default.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchurl, pkgconfig, which, makeQtWrapper, - libtool, openssl, qtbase, qttools }: +{ mkDerivation, lib, fetchurl, pkgconfig, which +, libtool, openssl, qtbase, qttools }: -with stdenv.lib; +with lib; -stdenv.mkDerivation rec { +mkDerivation rec { name = "xca-${version}"; version = "1.3.2"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ libtool openssl qtbase qttools ]; - nativeBuildInputs = [ makeQtWrapper pkgconfig which ]; + nativeBuildInputs = [ pkgconfig which ]; configureFlags = [ "CXXFLAGS=-std=c++11" ]; @@ -26,12 +26,7 @@ stdenv.mkDerivation rec { --replace ${qtbase}/bin/uic ${qtbase.dev}/bin/uic ''; - postInstall = '' - wrapQtProgram "$out/bin/xca" - wrapQtProgram "$out/bin/xca_db_stat" - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "Interface for managing asymetric keys like RSA or DSA"; homepage = http://xca.sourceforge.net/; platforms = platforms.all; diff --git a/pkgs/applications/misc/yakuake/default.nix b/pkgs/applications/misc/yakuake/default.nix index a70b4be287c..4a25f88ac75 100644 --- a/pkgs/applications/misc/yakuake/default.nix +++ b/pkgs/applications/misc/yakuake/default.nix @@ -1,8 +1,8 @@ -{ kdeDerivation +{ mkDerivation , lib , fetchurl , kdoctools -, kdeWrapper +, wrapGAppsHook , extra-cmake-modules , karchive , kcrash @@ -18,11 +18,10 @@ }: let - unwrapped = let - pname = "yakuake"; - version = "3.0.3"; - in kdeDerivation rec { - name = "${pname}-${version}"; + pname = "yakuake"; + version = "3.0.3"; +in mkDerivation rec { + name = "${pname}-${version}"; src = fetchurl { url = "http://download.kde.org/stable/${pname}/${version}/src/${name}.tar.xz"; @@ -42,22 +41,28 @@ let kwindowsystem ]; - nativeBuildInputs = [ - extra-cmake-modules kdoctools - ]; + propagatedBuildInputs = [ + karchive + kcrash + kdbusaddons + ki18n + kiconthemes + knewstuff + knotifications + knotifyconfig + kparts + kwindowsystem + ]; - meta = { - homepage = https://yakuake.kde.org; - description = "Quad-style terminal emulator for KDE"; - maintainers = with lib.maintainers; [ fridh ]; - }; + propagatedUserEnvPkgs = [ konsole ]; + + nativeBuildInputs = [ + extra-cmake-modules kdoctools wrapGAppsHook + ]; + + meta = { + homepage = https://yakuake.kde.org; + description = "Quad-style terminal emulator for KDE"; + maintainers = with lib.maintainers; [ fridh ]; }; - - -in -kdeWrapper -{ - inherit unwrapped; - targets = [ "bin/yakuake" ]; - paths = [ konsole.unwrapped ]; } diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index a8c49b9fd4a..614473d39ee 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, unzip, buildPythonApplication, makeQtWrapper, wrapGAppsHook +{ stdenv, lib, fetchurl, unzip, buildPythonApplication, makeWrapper, wrapGAppsHook , qtbase, pyqt5, jinja2, pygments, pyyaml, pypeg2, cssutils, glib_networking , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2, libxslt , gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-plugins-ugly, gst-libav @@ -44,7 +44,7 @@ in buildPythonApplication rec { ]; nativeBuildInputs = [ - makeQtWrapper wrapGAppsHook asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt + makeWrapper wrapGAppsHook asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt ]; propagatedBuildInputs = [ @@ -73,9 +73,8 @@ in buildPythonApplication rec { install -Dm755 -t "$out/share/qutebrowser/userscripts/" misc/userscripts/* ''; - postFixup = '' - wrapQtProgram $out/bin/qutebrowser \ - ${lib.optionalString withWebEngineDefault ''--add-flags "--backend webengine"''} + postFixup = lib.optionalString withWebEngineDefault '' + wrapProgram $out/bin/qutebrowser --add-flags "--backend webengine" ''; meta = { diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix index 12ed28979d2..cda86d2e652 100644 --- a/pkgs/applications/networking/dropbox/default.nix +++ b/pkgs/applications/networking/dropbox/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, makeDesktopItem, patchelf, makeWrapper, makeQtWrapper +{ mkDerivation, stdenv, lib, fetchurl, makeDesktopItem +, makeWrapper, patchelf , dbus_libs, fontconfig, freetype, gcc, glib , libdrm, libffi, libICE, libSM , libX11, libXcomposite, libXext, libXmu, libXrender, libxcb @@ -58,7 +59,7 @@ let startupNotify = "false"; }; -in stdenv.mkDerivation { +in mkDerivation { name = "dropbox-${version}"; src = fetchurl { name = "dropbox-${version}.tar.gz"; @@ -68,7 +69,7 @@ in stdenv.mkDerivation { sourceRoot = ".dropbox-dist"; - nativeBuildInputs = [ makeQtWrapper patchelf ]; + nativeBuildInputs = [ makeWrapper patchelf ]; dontStrip = true; # already done installPhase = '' @@ -94,7 +95,7 @@ in stdenv.mkDerivation { mkdir -p "$out/bin" RPATH="${ldpath}:$out/${appdir}" - makeQtWrapper "$out/${appdir}/dropbox" "$out/bin/dropbox" \ + makeWrapper "$out/${appdir}/dropbox" "$out/bin/dropbox" \ --prefix LD_LIBRARY_PATH : "$RPATH" chmod 755 $out/${appdir}/dropbox @@ -137,8 +138,8 @@ in stdenv.mkDerivation { meta = { homepage = "http://www.dropbox.com"; description = "Online stored folders (daemon version)"; - maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + maintainers = with lib.maintainers; [ ttuegel ]; platforms = [ "i686-linux" "x86_64-linux" ]; - license = stdenv.lib.licenses.unfree; + license = lib.licenses.unfree; }; } diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index d1773456df2..2c6cf473f1c 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, openal, opencv, +{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig, openal, opencv, libtoxcore, libsodium, libXScrnSaver, glib, gdk_pixbuf, gtk2, cairo, xorg, - pango, atk, qrencode, ffmpeg, filter-audio, makeQtWrapper, + pango, atk, qrencode, ffmpeg, filter-audio, qtbase, qtsvg, qttools, qttranslations, sqlcipher, libvpx, libopus }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "qtox-${version}"; version = "1.10.2"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { libpthreadstubs libXdmcp ]); - nativeBuildInputs = [ cmake makeQtWrapper pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ]; cmakeFlags = [ "-DGIT_DESCRIBE=${version}" @@ -35,14 +35,11 @@ stdenv.mkDerivation rec { runHook preInstall install -Dm755 qtox $out/bin/qtox - wrapQtProgram $out/bin/qtox runHook postInstall ''; - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = with lib; { description = "Qt Tox client"; license = licenses.gpl3; maintainers = with maintainers; [ viric jgeerds akaWolf peterhoeg ]; diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix index 781a4a18b9c..03fc0d85292 100644 --- a/pkgs/applications/networking/instant-messengers/quaternion/default.nix +++ b/pkgs/applications/networking/instant-messengers/quaternion/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchgit, qtbase, qtquickcontrols, cmake, makeQtWrapper }: +{ mkDerivation, lib, fetchgit, qtbase, qtquickcontrols, cmake }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "quaternion-git-${version}"; version = "2017-04-15"; @@ -18,25 +18,21 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - enableParallelBuilding = true; - buildInputs = [ qtbase qtquickcontrols ]; - nativeBuildInputs = [ cmake makeQtWrapper ]; + nativeBuildInputs = [ cmake ]; cmakeFlags = [ "-Wno-dev" ]; postInstall = '' - wrapQtProgram $out/bin/quaternion - substituteInPlace $out/share/applications/quaternion.desktop \ --replace 'Exec=quaternion' "Exec=$out/bin/quaternion" rm $out/share/icons/hicolor/icon-theme.cache ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://matrix.org/docs/projects/client/quaternion.html; description = "Cross-platform desktop IM client for the Matrix protocol"; license = licenses.gpl3; diff --git a/pkgs/applications/networking/instant-messengers/ricochet/default.nix b/pkgs/applications/networking/instant-messengers/ricochet/default.nix index d1af2ad70d1..b1dd7a4c90f 100644 --- a/pkgs/applications/networking/instant-messengers/ricochet/default.nix +++ b/pkgs/applications/networking/instant-messengers/ricochet/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, makeDesktopItem, unzip -, qtbase, qttools, makeQtWrapper, qtmultimedia, qtquick1, qtquickcontrols -, openssl, protobuf, qmakeHook +, qtbase, qttools, qtmultimedia, qtquick1, qtquickcontrols +, openssl, protobuf, qmake }: stdenv.mkDerivation rec { @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { openssl protobuf ]; - nativeBuildInputs = [ pkgconfig makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ pkgconfig qmake ]; preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags openssl)" @@ -38,7 +38,6 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin cp ricochet $out/bin - wrapQtProgram $out/bin/ricochet mkdir -p $out/share/applications cp $desktopItem/share/applications"/"* $out/share/applications diff --git a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix index a20119e0d73..67d1f55f2fe 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/cutegram/default.nix @@ -3,7 +3,7 @@ , qtimageformats, qtgraphicaleffects, qtwebkit , telegram-qml, libqtelegram-aseman-edition , gst_all_1 -, makeQtWrapper, qmakeHook }: +, makeWrapper, qmake }: stdenv.mkDerivation rec { name = "cutegram-${meta.version}"; @@ -20,12 +20,12 @@ stdenv.mkDerivation rec { telegram-qml libqtelegram-aseman-edition ] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly ]); - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; enableParallelBuilding = true; + nativeBuildInputs = [ makeWrapper qmake ]; fixupPhase = '' - wrapQtProgram $out/bin/cutegram \ + wrapProgram $out/bin/cutegram \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" ''; diff --git a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix index 322c40afc7d..ec2e65dc499 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/libqtelegram-aseman-edition/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub -, qtbase, qtmultimedia, qtquick1, qmakeHook }: +, qtbase, qtmultimedia, qtquick1, qmake }: stdenv.mkDerivation rec { name = "libqtelegram-aseman-edition-${meta.version}"; @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtmultimedia qtquick1 ]; - nativeBuildInputs = [ qmakeHook ]; enableParallelBuilding = true; + nativeBuildInputs = [ qmake ]; patchPhase = '' substituteInPlace libqtelegram-ae.pro --replace "/libqtelegram-ae" "" diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index d64b5be816a..0af0c0b1d1b 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,10 +1,10 @@ -{ stdenv, lib, fetchFromGitHub, fetchgit, pkgconfig, gyp, cmake -, qtbase, qtimageformats, makeQtWrapper +{ mkDerivation, lib, fetchFromGitHub, fetchgit, pkgconfig, gyp, cmake +, qtbase, qtimageformats , breakpad, gtk3, libappindicator-gtk3, dee , ffmpeg, openalSoft, minizip }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "telegram-desktop-${version}"; version = "1.0.27"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { gtk3 libappindicator-gtk3 dee qtbase qtimageformats ffmpeg openalSoft minizip ]; - nativeBuildInputs = [ pkgconfig gyp cmake makeQtWrapper ]; + nativeBuildInputs = [ pkgconfig gyp cmake ]; patches = [ "${tgaur}/aur-build-fixes.patch" ]; @@ -86,10 +86,9 @@ stdenv.mkDerivation rec { for icon_size in 16 32 48 64 128 256 512; do install -Dm644 "../../../Telegram/Resources/art/icon''${icon_size}.png" "$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps/telegram-desktop.png" done - wrapQtProgram $out/bin/telegram-desktop ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Telegram Desktop messaging app"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix index 854648d9786..c8d24c9b28c 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-qml/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub -, qtbase, qtmultimedia, qtquick1, qmakeHook +, qtbase, qtmultimedia, qtquick1, qmake , libqtelegram-aseman-edition }: stdenv.mkDerivation rec { @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ qtbase qtmultimedia qtquick1 libqtelegram-aseman-edition ]; - nativeBuildInputs = [ qmakeHook ]; enableParallelBuilding = true; + nativeBuildInputs = [ qmake ]; patchPhase = '' substituteInPlace telegramqml.pro --replace "/\$\$LIB_PATH" "" diff --git a/pkgs/applications/networking/instant-messengers/tensor/default.nix b/pkgs/applications/networking/instant-messengers/tensor/default.nix index 0dfda79e767..0571946061b 100644 --- a/pkgs/applications/networking/instant-messengers/tensor/default.nix +++ b/pkgs/applications/networking/instant-messengers/tensor/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, qtbase, qtquickcontrols, qmakeHook, makeQtWrapper, makeDesktopItem }: +{ stdenv, fetchgit, qtbase, qtquickcontrols, qmake, makeDesktopItem }: stdenv.mkDerivation rec { name = "tensor-git-${version}"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; buildInputs = [ qtbase qtquickcontrols ]; - nativeBuildInputs = [ qmakeHook makeQtWrapper ]; + nativeBuildInputs = [ qmake ]; desktopItem = makeDesktopItem { name = "tensor"; @@ -36,8 +36,6 @@ stdenv.mkDerivation rec { install -Dm644 ${desktopItem}/share/applications/tensor.desktop \ $out/share/applications/tensor.desktop - wrapQtProgram $out/bin/tensor - substituteInPlace $out/share/applications/tensor.desktop \ --subst-var-by bin $out/bin/tensor diff --git a/pkgs/applications/networking/irc/communi/default.nix b/pkgs/applications/networking/irc/communi/default.nix index c521084213e..9bfdd8408da 100644 --- a/pkgs/applications/networking/irc/communi/default.nix +++ b/pkgs/applications/networking/irc/communi/default.nix @@ -1,4 +1,4 @@ -{ fetchgit, libcommuni, makeQtWrapper, qtbase, qmakeHook, stdenv }: +{ fetchgit, libcommuni, qtbase, qmake, stdenv }: stdenv.mkDerivation rec { name = "communi-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ makeQtWrapper qmakeHook ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ libcommuni qtbase ]; @@ -30,7 +30,6 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapQtProgram "$out/bin/communi" substituteInPlace "$out/share/applications/communi.desktop" \ --replace "/usr/bin" "$out/bin" ''; diff --git a/pkgs/applications/networking/irc/konversation/default.nix b/pkgs/applications/networking/irc/konversation/default.nix index 6f4bc2af79f..4cfde1f9b07 100644 --- a/pkgs/applications/networking/irc/konversation/default.nix +++ b/pkgs/applications/networking/irc/konversation/default.nix @@ -1,15 +1,14 @@ -{ kdeDerivation +{ mkDerivation , lib , fetchurl , extra-cmake-modules +, kdoctools , kbookmarks , karchive , kconfig , kconfigwidgets , kcoreaddons , kdbusaddons -, kdeWrapper -, kdoctools , kemoticons , kglobalaccel , ki18n @@ -21,62 +20,55 @@ , kio , kparts , kwallet -, makeQtWrapper , solid , sonnet , phonon }: let - unwrapped = let - pname = "konversation"; - version = "1.6.2"; - in kdeDerivation rec { - name = "${pname}-${version}"; + pname = "konversation"; + version = "1.6.2"; +in mkDerivation rec { + name = "${pname}-${version}"; - src = fetchurl { - url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; - sha256 = "1798sslwz7a3h1v524ra33p0j5iqvcg0v1insyvb5qp4kv11slmn"; - }; - - buildInputs = [ - kbookmarks - karchive - kconfig - kconfigwidgets - kcoreaddons - kdbusaddons - kdoctools - kemoticons - kglobalaccel - ki18n - kiconthemes - kidletime - kitemviews - knotifications - knotifyconfig - kio - kparts - kwallet - solid - sonnet - phonon - ]; - - nativeBuildInputs = [ - extra-cmake-modules - kdoctools - ]; - - meta = { - description = "Integrated IRC client for KDE"; - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ fridh ]; - homepage = https://konversation.kde.org; - }; + src = fetchurl { + url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; + sha256 = "1798sslwz7a3h1v524ra33p0j5iqvcg0v1insyvb5qp4kv11slmn"; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/konversation" ]; -} + buildInputs = [ + kbookmarks + karchive + kconfig + kconfigwidgets + kcoreaddons + kdbusaddons + kdoctools + kemoticons + kglobalaccel + ki18n + kiconthemes + kidletime + kitemviews + knotifications + knotifyconfig + kio + kparts + kwallet + solid + sonnet + phonon + ]; + + nativeBuildInputs = [ + extra-cmake-modules + kdoctools + ]; + + meta = { + description = "Integrated IRC client for KDE"; + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ fridh ]; + homepage = https://konversation.kde.org; + }; +} diff --git a/pkgs/applications/networking/linssid/default.nix b/pkgs/applications/networking/linssid/default.nix index d35c2e100e4..ad571888a9c 100644 --- a/pkgs/applications/networking/linssid/default.nix +++ b/pkgs/applications/networking/linssid/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qtsvg, qmakeHook, pkgconfig, boost, wirelesstools, iw, qwt6 }: +{ stdenv, fetchurl, qtbase, qtsvg, qmake, pkgconfig, boost, wirelesstools, iw, qwt6 }: stdenv.mkDerivation rec { name = "linssid-${version}"; @@ -9,7 +9,8 @@ stdenv.mkDerivation rec { sha256 = "13d35rlcjncd8lx3khkgn9x8is2xjd5fp6ns5xsn3w6l4xj9b4gl"; }; - buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 qmakeHook ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtbase qtsvg pkgconfig boost qwt6 ]; patches = [ ./0001-unbundled-qwt.patch ]; diff --git a/pkgs/applications/networking/mailreaders/trojita/default.nix b/pkgs/applications/networking/mailreaders/trojita/default.nix index fa6e4db0a0d..26cb9e40a26 100644 --- a/pkgs/applications/networking/mailreaders/trojita/default.nix +++ b/pkgs/applications/networking/mailreaders/trojita/default.nix @@ -1,13 +1,12 @@ -{ stdenv +{ mkDerivation , lib , fetchgit , cmake , qtbase , qtwebkit -, makeQtWrapper }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "trojita-${version}"; version = "0.7"; @@ -18,25 +17,20 @@ stdenv.mkDerivation rec { }; buildInputs = [ - cmake qtbase qtwebkit ]; nativeBuildInputs = [ - makeQtWrapper + cmake ]; - postInstall = '' - wrapQtProgram "$out/bin/trojita" - ''; - - meta = { + meta = with lib; { description = "A Qt IMAP e-mail client"; homepage = http://trojita.flaska.net/; - license = with lib.licenses; [ gpl2 gpl3 ]; - platforms = stdenv.lib.platforms.linux; + license = with licenses; [ gpl2 gpl3 ]; + platforms = platforms.linux; }; } diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index fa8ccf60a2a..696681dce27 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -20,7 +20,7 @@ let patches = optional jackSupport ./mumble-jack-support.patch; nativeBuildInputs = [ pkgconfig python ] - ++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmakeHook ]; }."qt${toString source.qtVersion}" + ++ { qt4 = [ qmake4Hook ]; qt5 = [ qt5.qmake ]; }."qt${toString source.qtVersion}" ++ (overrides.nativeBuildInputs or [ ]); buildInputs = [ boost protobuf avahi ] ++ { qt4 = [ qt4 ]; qt5 = [ qt5.qtbase ]; }."qt${toString source.qtVersion}" @@ -70,7 +70,7 @@ let client = source: generic { type = "mumble"; - nativeBuildInputs = optionals (source.qtVersion == 5) [ qt5.qttools qt5.makeQtWrapper ]; + nativeBuildInputs = optionals (source.qtVersion == 5) [ qt5.qttools ]; buildInputs = [ libopus libsndfile speex ] ++ optional (source.qtVersion == 5) qt5.qtsvg ++ optional stdenv.isLinux alsaLib @@ -91,10 +91,6 @@ let mkdir -p $out/share/icons{,/hicolor/scalable/apps} cp icons/mumble.svg $out/share/icons ln -s $out/share/icon/mumble.svg $out/share/icons/hicolor/scalable/apps - - ${optionalString (source.qtVersion == 5) '' - wrapQtProgram $out/bin/mumble - ''} ''; } source; diff --git a/pkgs/applications/networking/newsreaders/quiterss/default.nix b/pkgs/applications/networking/newsreaders/quiterss/default.nix index 2f20710a909..4bf571a93d8 100644 --- a/pkgs/applications/networking/newsreaders/quiterss/default.nix +++ b/pkgs/applications/networking/newsreaders/quiterss/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qt5, qmakeHook, makeQtWrapper, pkgconfig, sqlite }: +{ stdenv, fetchFromGitHub, qtbase, qmake, qttools, qtwebkit, pkgconfig, sqlite }: stdenv.mkDerivation rec { name = "quiterss-${version}"; @@ -11,11 +11,8 @@ stdenv.mkDerivation rec { sha256 = "1y0n5ps1z4wgf9hkfjrw7dfyncrw22bf9mi3052vmf3s7xzz6vbb"; }; - buildInputs = [ qt5.qtbase qt5.qttools qt5.qtwebkit qmakeHook makeQtWrapper pkgconfig sqlite.dev ]; - - postInstall = '' - wrapQtProgram "$out/bin/quiterss" - ''; + nativeBuildInputs = [ pkgconfig qmake ]; + buildInputs = [ qtbase qttools qtwebkit sqlite.dev ]; meta = with stdenv.lib; { description = "A Qt-based RSS/Atom news feed reader"; diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index de05555633e..4db6c9dc16b 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, which -, boost, libtorrentRasterbar, qmakeHook, qt5 +, boost, libtorrentRasterbar, qmake, qtbase, qttools , debugSupport ? false # Debugging , guiSupport ? true, dbus_libs ? null # GUI (disable to run headless) , webuiSupport ? true # WebUI @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { sha256 = "0vs626khavhqqnq2hrwrxyc8ihbngharcf1fd37nwccvy13qqljn"; }; - nativeBuildInputs = [ pkgconfig which ]; + nativeBuildInputs = [ pkgconfig which qmake ]; - buildInputs = [ boost libtorrentRasterbar qt5.qtbase qt5.qttools ] + buildInputs = [ boost libtorrentRasterbar qtbase qttools ] ++ optional guiSupport dbus_libs; preConfigure = '' diff --git a/pkgs/applications/office/cb2bib/default.nix b/pkgs/applications/office/cb2bib/default.nix index abff61b881f..1004733a18b 100644 --- a/pkgs/applications/office/cb2bib/default.nix +++ b/pkgs/applications/office/cb2bib/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qmakeHook, qtbase, qtwebkit, qtx11extras, lzo, libX11 }: +{ stdenv, fetchurl, qmake, qtbase, qtwebkit, qtx11extras, lzo, libX11 }: stdenv.mkDerivation rec { name = pname + "-" + version; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0yz79v023w1229wzck3gij0iqah1xg8rg4a352q8idvg7bdmyfin"; }; buildInputs = [ qtbase qtwebkit qtx11extras lzo libX11 ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; configurePhase = '' runHook preConfigure diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix index 95286f3ab65..7178a0930e7 100644 --- a/pkgs/applications/office/mendeley/default.nix +++ b/pkgs/applications/office/mendeley/default.nix @@ -1,4 +1,5 @@ { fetchurl, stdenv, dpkg, which +, makeWrapper , alsaLib , desktop_file_utils , dbus @@ -92,7 +93,7 @@ stdenv.mkDerivation { sha256 = sha256; }; - nativeBuildInputs = [ qt5.makeQtWrapper ]; + nativeBuildInputs = [ makeWrapper ]; buildInputs = [ dpkg which ] ++ deps; unpackPhase = "true"; @@ -107,7 +108,7 @@ stdenv.mkDerivation { $out/bin/mendeleydesktop paxmark m $out/bin/mendeleydesktop - wrapQtProgram $out/bin/mendeleydesktop \ + wrapProgram $out/bin/mendeleydesktop \ --add-flags "--unix-distro-build" \ ${stdenv.lib.optionalString autorunLinkHandler ''--run "$out/bin/install-mendeley-link-handler.sh $out/bin/mendeleydesktop"''} diff --git a/pkgs/applications/office/mytetra/default.nix b/pkgs/applications/office/mytetra/default.nix index b35e60cf2d6..9f54f2df6bf 100644 --- a/pkgs/applications/office/mytetra/default.nix +++ b/pkgs/applications/office/mytetra/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qmakeHook, makeQtWrapper, qtsvg }: +{ stdenv, fetchurl, qmake, qtsvg }: let version = "1.42.2"; @@ -9,7 +9,8 @@ in stdenv.mkDerivation rec { sha256 = "1ah44nf4ksxkh01a2zmgvvby4pwczhyq5vcp270rf6visp8v9804"; }; - buildInputs = [ qmakeHook makeQtWrapper qtsvg ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtsvg ]; hardeningDisable = [ "format" ]; @@ -22,8 +23,6 @@ in stdenv.mkDerivation rec { --replace ":/resource/pic/logo.svg" "$out/share/icons/hicolor/48x48/apps/mytetra.png" ''; - postInstall = "wrapQtProgram $out/bin/mytetra"; - meta = with stdenv.lib; { description = "Smart manager for information collecting"; homepage = http://webhamster.ru/site/page/index/articles/projectcode/138; diff --git a/pkgs/applications/office/skrooge/default.nix b/pkgs/applications/office/skrooge/default.nix index acf60bd0375..38ec107bcf7 100644 --- a/pkgs/applications/office/skrooge/default.nix +++ b/pkgs/applications/office/skrooge/default.nix @@ -1,9 +1,10 @@ -{ stdenv, fetchurl, cmake, extra-cmake-modules, makeQtWrapper, qtwebkit, qtscript, grantlee, +{ mkDerivation, lib, fetchurl, + cmake, extra-cmake-modules, qtwebkit, qtscript, grantlee, kxmlgui, kwallet, kparts, kdoctools, kjobwidgets, kdesignerplugin, kiconthemes, knewstuff, sqlcipher, qca-qt5, kdelibs4support, kactivities, knotifyconfig, krunner, libofx }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "skrooge-${version}"; version = "2.7.0"; @@ -12,21 +13,14 @@ stdenv.mkDerivation rec { sha256 = "1xrh9nal122rzlv4m0x8qah6zpqb6891al3351piarpk2xgjgj4x"; }; - nativeBuildInputs = [ cmake extra-cmake-modules makeQtWrapper ]; + nativeBuildInputs = [ cmake extra-cmake-modules ]; buildInputs = [ qtwebkit qtscript grantlee kxmlgui kwallet kparts kdoctools kjobwidgets kdesignerplugin kiconthemes knewstuff sqlcipher qca-qt5 kdelibs4support kactivities knotifyconfig krunner libofx ]; - enableParallelBuilding = true; - - postInstall = '' - wrapQtProgram "$out/bin/skrooge" - wrapQtProgram "$out/bin/skroogeconvert" - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "A personal finances manager, powered by KDE"; license = with licenses; [ gpl3 ]; maintainers = with maintainers; [ joko ]; diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 49c774f7039..da6aa38d746 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -1,9 +1,10 @@ -{ stdenv, fetchurl, cmake, freetype, libpng, mesa, gettext, openssl, perl, libiconv -, qtscript, qtserialport, qttools, makeQtWrapper +{ mkDerivation, lib, fetchurl +, cmake, freetype, libpng, mesa, gettext, openssl, perl, libiconv +, qtscript, qtserialport, qttools , qtmultimedia }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "stellarium-${version}"; version = "0.15.0"; @@ -12,25 +13,19 @@ stdenv.mkDerivation rec { sha256 = "0il751lgnfkx35h1m8fzwwnrygpxjx2a80gng1i1rbybkykf7l3l"; }; - nativeBuildInputs = [ makeQtWrapper ]; + nativeBuildInputs = [ cmake perl ]; buildInputs = [ - cmake freetype libpng mesa gettext openssl perl libiconv qtscript - qtserialport qttools qtmultimedia + freetype libpng mesa openssl libiconv qtscript qtserialport qttools + qtmultimedia ]; - enableParallelBuilding = true; - - postInstall = '' - wrapQtProgram "$out/bin/stellarium" - ''; - - meta = { + meta = with lib; { description = "Free open-source planetarium"; homepage = "http://stellarium.org/"; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; - platforms = stdenv.lib.platforms.linux; # should be mesaPlatforms, but we don't have qt on darwin - maintainers = [ stdenv.lib.maintainers.peti ]; + platforms = platforms.linux; # should be mesaPlatforms, but we don't have qt on darwin + maintainers = [ maintainers.peti ]; }; } diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index 838697f1394..ab508854310 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchpatch, fetchFromGitHub, makeQtWrapper, qmakeHook, pkgconfig +{ stdenv, fetchpatch, fetchFromGitHub, qmake, pkgconfig , qtbase, qtsvg, qtserialport, boost, libgit2 }: @@ -28,20 +28,14 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase qtsvg qtserialport boost libgit2 ]; - nativeBuildInputs = [ qmakeHook makeQtWrapper pkgconfig ]; + nativeBuildInputs = [ qmake pkgconfig ]; qmakeFlags = [ "phoenix.pro" ]; - enableParallelBuilding = true; - preConfigure = '' ln -s "$parts" parts ''; - postInstall = '' - wrapQtProgram $out/bin/Fritzing - ''; - meta = { description = "An open source prototyping tool for Arduino-based projects"; homepage = http://fritzing.org/; diff --git a/pkgs/applications/science/math/speedcrunch/default.nix b/pkgs/applications/science/math/speedcrunch/default.nix index 861deaff741..d36b135531c 100644 --- a/pkgs/applications/science/math/speedcrunch/default.nix +++ b/pkgs/applications/science/math/speedcrunch/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchgit, cmake, makeQtWrapper, qtbase, qttools }: +{ mkDerivation, lib, fetchgit, cmake, qtbase, qttools }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "speedcrunch-${version}"; version = "0.12.0"; @@ -11,21 +11,15 @@ stdenv.mkDerivation rec { sha256 = "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk"; }; - enableParallelBuilding = true; - buildInputs = [ qtbase qttools ]; - nativeBuildInputs = [ cmake makeQtWrapper ]; + nativeBuildInputs = [ cmake ]; preConfigure = '' cd src ''; - postFixup = '' - wrapQtProgram $out/bin/speedcrunch - ''; - - meta = with stdenv.lib; { + meta = with lib; { homepage = http://speedcrunch.org; license = licenses.gpl2Plus; description = "A fast power user calculator"; diff --git a/pkgs/applications/science/programming/fdr/default.nix b/pkgs/applications/science/programming/fdr/default.nix index a82027a628f..8ed8e0e73b0 100644 --- a/pkgs/applications/science/programming/fdr/default.nix +++ b/pkgs/applications/science/programming/fdr/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation { cp -r * "$out" # Hack around lack of libtinfo in NixOS ln -s ${ncurses.out}/lib/libncursesw.so.6 $out/lib/libtinfo.so.5 - ln -s ${qtbase.out}/lib/qt5/plugins $out/lib/qt_plugins + ln -s ${qtbase.out}/$qtPluginPrefix $out/lib/qt_plugins ln -s ${zlib.out}/lib/libz.so.1 $out/lib/libz.so.1 for b in fdr4 _fdr4 refines _refines cspmprofiler cspmexplorerprof diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix index e323b42d7ae..98ec39eb206 100644 --- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -1,19 +1,16 @@ { stdenv, fetchgit, git, espeak, SDL, udev, doxygen, cmake - , qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns - , qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmakeHook - , makeQtWrapper, lndir - , gst_all_1, qt-gstreamer1, pkgconfig, glibc - , version ? "2.9.4" +, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns +, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake +, makeWrapper, lndir +, gst_all_1, qt-gstreamer1, pkgconfig, glibc +, version ? "2.9.4" }: stdenv.mkDerivation rec { name = "qgroundcontrol-${version}"; - buildInputs = [ - SDL udev doxygen git - ] ++ gstInputs; qtInputs = [ - qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg + qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg qtquick1 qtquickcontrols qtgraphicaleffects ]; @@ -22,9 +19,8 @@ stdenv.mkDerivation rec { ]; enableParallelBuilding = true; - nativeBuildInputs = [ - pkgconfig makeQtWrapper qmakeHook - ] ++ qtInputs; + buildInputs = [ SDL udev doxygen git ] ++ gstInputs ++ qtInputs; + nativeBuildInputs = [ pkgconfig makeWrapper qmake ]; patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ]; postPatch = '' @@ -56,10 +52,10 @@ stdenv.mkDerivation rec { # we need to link to our Qt deps in our own output if we want # this package to work without being installed as a system pkg - mkdir -p $out/lib/qt5 $out/etc/xdg + mkdir -p $out/lib/qt-$qtCompatVersion $out/etc/xdg for pkg in $qtInputs; do - if [[ -d $pkg/lib/qt5 ]]; then - for dir in lib/qt5 share etc/xdg; do + if [[ -d $pkg/lib/qt-$qtCompatVersion ]]; then + for dir in lib/qt-$qtCompatVersion share etc/xdg; do if [[ -d $pkg/$dir ]]; then ${lndir}/bin/lndir "$pkg/$dir" "$out/$dir" fi @@ -70,7 +66,7 @@ stdenv.mkDerivation rec { postInstall = '' - wrapQtProgram "$out/bin/qgroundcontrol" \ + wrapProgram "$out/bin/qgroundcontrol" \ --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" ''; diff --git a/pkgs/applications/video/bomi/default.nix b/pkgs/applications/video/bomi/default.nix index c98e2747989..bffb038f653 100644 --- a/pkgs/applications/video/bomi/default.nix +++ b/pkgs/applications/video/bomi/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, perl, python, which, makeQtWrapper +{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, perl, python, which , libX11, libxcb, mesa -, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmakeHook +, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmake, makeWrapper , libchardet , ffmpeg @@ -90,7 +90,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - wrapQtProgram $out/bin/bomi \ + wrapProgram $out/bin/bomi \ ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"} ''; @@ -104,9 +104,7 @@ stdenv.mkDerivation rec { ++ optional cddaSupport "--enable-cdda" ; - nativeBuildInputs = [ pkgconfig perl python which qttools makeQtWrapper qmakeHook ]; - - enableParallelBuilding = true; + nativeBuildInputs = [ makeWrapper pkgconfig perl python which qttools qmake ]; meta = with stdenv.lib; { description = "Powerful and easy-to-use multimedia player"; diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix index 656ec1163dc..f67ab412c26 100644 --- a/pkgs/applications/video/openshot-qt/default.nix +++ b/pkgs/applications/video/openshot-qt/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub , doxygen, python3Packages, libopenshot -, makeQtWrapper, wrapGAppsHook, gtk3 }: +, wrapGAppsHook, gtk3 }: python3Packages.buildPythonApplication rec { name = "openshot-qt-${version}"; diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix index 140c8e5863d..4ca31916965 100644 --- a/pkgs/applications/video/shotcut/default.nix +++ b/pkgs/applications/video/shotcut/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, SDL, frei0r, gettext, mlt, jack1, pkgconfig, qtbase, qtmultimedia, qtwebkit, qtx11extras, qtwebsockets, qtquickcontrols, qtgraphicaleffects, -qmakeHook, makeQtWrapper }: +qmake, makeWrapper }: stdenv.mkDerivation rec { name = "shotcut-${version}"; @@ -12,10 +12,14 @@ stdenv.mkDerivation rec { sha256 = "09nygz1x9fvqf33gqpc6jnr1j7ny0yny3w2ngwqqfkf3f8n83qhr"; }; - buildInputs = [ SDL frei0r gettext mlt pkgconfig qtbase qtmultimedia qtwebkit - qtx11extras qtwebsockets qtquickcontrols qtgraphicaleffects qmakeHook makeQtWrapper ]; enableParallelBuilding = true; + nativeBuildInputs = [ makeWrapper pkgconfig qmake ]; + buildInputs = [ + SDL frei0r gettext mlt + qtbase qtmultimedia qtwebkit qtx11extras qtwebsockets qtquickcontrols + qtgraphicaleffects + ]; prePatch = '' sed 's_shotcutPath, "qmelt"_"${mlt}/bin/melt"_' -i src/jobs/meltjob.cpp @@ -27,7 +31,7 @@ stdenv.mkDerivation rec { postInstall = '' mkdir -p $out/share/shotcut cp -r src/qml $out/share/shotcut/ - wrapQtProgram $out/bin/shotcut --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ jack1 SDL ]} --prefix PATH : ${mlt}/bin + wrapProgram $out/bin/shotcut --prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ jack1 SDL ]} --prefix PATH : ${mlt}/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/video/smplayer/default.nix b/pkgs/applications/video/smplayer/default.nix index 146cb3b0e46..b7e4fe6b7c6 100644 --- a/pkgs/applications/video/smplayer/default.nix +++ b/pkgs/applications/video/smplayer/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qmakeHook, qtscript }: +{ stdenv, fetchurl, qmake, qtscript }: stdenv.mkDerivation rec { name = "smplayer-17.6.0"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtscript ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; dontUseQmakeConfigure = true; diff --git a/pkgs/applications/video/smtube/default.nix b/pkgs/applications/video/smtube/default.nix index 3f0aff6a15b..b0588796709 100644 --- a/pkgs/applications/video/smtube/default.nix +++ b/pkgs/applications/video/smtube/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qmakeHook, qtscript, qtwebkit }: +{ stdenv, fetchurl, qmake, qtscript, qtwebkit }: stdenv.mkDerivation rec { version = "17.5.0"; @@ -15,7 +15,8 @@ stdenv.mkDerivation rec { dontUseQmakeConfigure = true; - buildInputs = [ qmakeHook qtscript qtwebkit ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtscript qtwebkit ]; meta = with stdenv.lib; { description = "Play and download Youtube videos"; diff --git a/pkgs/applications/video/vokoscreen/default.nix b/pkgs/applications/video/vokoscreen/default.nix index 204580b108f..b10495434b9 100644 --- a/pkgs/applications/video/vokoscreen/default.nix +++ b/pkgs/applications/video/vokoscreen/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit -, pkgconfig, qtbase, qttools, qmakeHook, qtx11extras, alsaLib, libv4l, libXrandr +, pkgconfig, qtbase, qttools, qmake, qtx11extras, alsaLib, libv4l, libXrandr , ffmpeg }: @@ -11,13 +11,12 @@ stdenv.mkDerivation { sha256 = "1hvw7xz1mj16ishbaip73wddbmgibsz0pad4y586zbarpynss25z"; }; + nativeBuildInputs = [ pkgconfig qmake ]; buildInputs = [ alsaLib libv4l - pkgconfig qtbase qttools - qmakeHook qtx11extras libXrandr ]; diff --git a/pkgs/applications/virtualization/virt-manager/qt.nix b/pkgs/applications/virtualization/virt-manager/qt.nix index 7e05324a046..783a424e18c 100644 --- a/pkgs/applications/virtualization/virt-manager/qt.nix +++ b/pkgs/applications/virtualization/virt-manager/qt.nix @@ -1,9 +1,9 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, qtbase, qtmultimedia, qtsvg, makeQtWrapper +{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig +, qtbase, qtmultimedia, qtsvg , lxqt, libvncserver, libvirt, pixman, spice_gtk, spice_protocol }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "virt-manager-qt-${version}"; version = "0.43.70.2"; @@ -23,17 +23,9 @@ stdenv.mkDerivation rec { libvirt libvncserver pixman spice_gtk spice_protocol ]; - nativeBuildInputs = [ cmake pkgconfig makeQtWrapper ]; + nativeBuildInputs = [ cmake pkgconfig ]; - postFixup = '' - for f in $out/bin/* ; do - wrapQtProgram $f - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = with lib; { homepage = http://f1ash.github.io/qt-virt-manager; description = "Desktop user interface for managing virtual machines (QT)"; longDescription = '' diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index 6c49e95b6b9..32e8f9d23f4 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -58,7 +58,7 @@ in stdenv.mkDerivation { ++ optional pythonBindings python # Python is needed even when not building bindings ++ optional pulseSupport libpulseaudio ++ optionals (headless) [ libXrandr ] - ++ optionals (!headless) [ qt5.qtbase qt5.qtx11extras qt5.makeQtWrapper libXinerama SDL ]; + ++ optionals (!headless) [ qt5.qtbase qt5.qtx11extras libXinerama SDL ]; hardeningDisable = [ "fortify" "pic" "stackprotector" ]; @@ -153,12 +153,8 @@ in stdenv.mkDerivation { find out/linux.*/${buildType}/bin -mindepth 1 -maxdepth 1 \ -name src -o -exec cp -avt "$libexec" {} + - # Create wrapper script mkdir -p $out/bin - ${optionalString (!headless) '' - makeQtWrapper "$libexec/VirtualBox" $out/bin/VirtualBox - ''} - for file in ${optionalString (!headless) "VBoxSDL rdesktop-vrdp"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do + for file in ${optionalString (!headless) "VirtualBox VBoxSDL rdesktop-vrdp"} VBoxManage VBoxBalloonCtrl VBoxHeadless; do echo "Linking $file to /bin" test -x "$libexec/$file" ln -s "$libexec/$file" $out/bin/$file diff --git a/pkgs/build-support/kde/derivation.nix b/pkgs/build-support/kde/derivation.nix deleted file mode 100644 index 2e29a0a661e..00000000000 --- a/pkgs/build-support/kde/derivation.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv, lib, debug ? false }: - -args: - -stdenv.mkDerivation (args // { - - outputs = args.outputs or [ "out" "dev" ]; - - propagatedUserEnvPkgs = - builtins.map lib.getBin (args.propagatedBuildInputs or []); - - cmakeFlags = - (args.cmakeFlags or []) - ++ [ "-DBUILD_TESTING=OFF" ] - ++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug"; - -}) diff --git a/pkgs/build-support/kde/wrapper.nix b/pkgs/build-support/kde/wrapper.nix deleted file mode 100644 index 4442b111d79..00000000000 --- a/pkgs/build-support/kde/wrapper.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ stdenv, lib, makeWrapper, buildEnv, gtk3, dconf }: - -packages: - -let - packages_ = if builtins.isList packages then packages else [packages]; - - unwrapped = lib.concatMap (p: if builtins.isList p.unwrapped then p.unwrapped else [p.unwrapped]) packages_; - targets = lib.concatMap (p: p.targets) packages_; - paths = lib.concatMap (p: p.paths or []) packages_; - - name = - if builtins.length unwrapped == 1 - then (lib.head unwrapped).name - else "kde-application"; - meta = - if builtins.length unwrapped == 1 - then (lib.head unwrapped).meta - else {}; - - env = buildEnv { - inherit name meta; - paths = builtins.map lib.getBin (unwrapped ++ paths); - pathsToLink = [ "/bin" "/share" "/lib/qt5" "/etc/xdg" ]; - }; -in - -stdenv.mkDerivation { - inherit name meta; - preferLocalBuild = true; - - inherit unwrapped env targets; - - passthru = { - inherit targets paths; - unwrapped = if builtins.length unwrapped == 1 then lib.head unwrapped else unwrapped; - }; - - nativeBuildInputs = [ makeWrapper ]; - - buildCommand = '' - for t in $targets; do - good="" - for drv in $unwrapped; do - if [ -a "$drv/$t" ]; then - makeWrapper "$drv/$t" "$out/$t" \ - --argv0 '"$0"' \ - --suffix PATH : "$env/bin" \ - --prefix XDG_CONFIG_DIRS : "$env/etc/xdg" \ - --prefix XDG_DATA_DIRS : "$env/share:${gtk3}/share/gsettings-schemas/${gtk3.name}" \ - --prefix QML_IMPORT_PATH : "$env/lib/qt5/imports" \ - --prefix QML2_IMPORT_PATH : "$env/lib/qt5/qml" \ - --prefix QT_PLUGIN_PATH : "$env/lib/qt5/plugins" \ - --prefix GIO_EXTRA_MODULES : "${dconf.lib}/lib/gio/modules" - good="1" - break - fi - done - if [ -z "$good" ]; then - echo "file or directory not found in derivations: $t" - exit 1 - fi - done - - mkdir -p "$out/nix-support" - echo "$unwrapped" > "$out/nix-support/propagated-user-env-packages" - ''; -} diff --git a/pkgs/data/documentation/zeal/default.nix b/pkgs/data/documentation/zeal/default.nix index 25a99789af5..36416c6f827 100644 --- a/pkgs/data/documentation/zeal/default.nix +++ b/pkgs/data/documentation/zeal/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, libarchive, pkgconfig, qtbase -, qtimageformats, qtwebkit, qtx11extras, xcbutilkeysyms, qmakeHook }: +, qtimageformats, qtwebkit, qtx11extras, xcbutilkeysyms, qmake }: stdenv.mkDerivation rec { version = "0.3.1"; @@ -12,8 +12,9 @@ stdenv.mkDerivation rec { sha256 = "14ld7zm15677jdlasnfa6c42kiswd4d6yg1db50xbk2yflzzwqqa"; }; + nativeBuildInputs = [ pkgconfig qmake ]; buildInputs = [ - xcbutilkeysyms pkgconfig qtbase qtimageformats qtwebkit qtx11extras libarchive qmakeHook + xcbutilkeysyms qtbase qtimageformats qtwebkit qtx11extras libarchive ]; qmakeFlags = [ "PREFIX=/" ]; diff --git a/pkgs/desktops/lumina/default.nix b/pkgs/desktops/lumina/default.nix index 2c80f5157b6..81ced85d462 100644 --- a/pkgs/desktops/lumina/default.nix +++ b/pkgs/desktops/lumina/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fluxbox, xscreensaver, desktop_file_utils, numlockx, - xorg, qtbase, qtsvg, qtmultimedia, qtx11extras, qmakeHook, qttools, oxygen-icons5 + xorg, qtbase, qtsvg, qtmultimedia, qtx11extras, qmake, qttools, oxygen-icons5 }: stdenv.mkDerivation rec { @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - qmakeHook + qmake qttools ]; diff --git a/pkgs/desktops/lxqt/default.nix b/pkgs/desktops/lxqt/default.nix index fbcb286f5b2..735ba79b405 100644 --- a/pkgs/desktops/lxqt/default.nix +++ b/pkgs/desktops/lxqt/default.nix @@ -13,7 +13,7 @@ let --replace "DESTINATION \"\''${LXQT_ETC_XDG_DIR}" "DESTINATION \"etc/xdg" \ --replace "DESTINATION \"\''${LXQT_SHARE_DIR}" "DESTINATION \"share/lxqt" \ --replace "DESTINATION \"\''${LXQT_GRAPHICS_DIR}" "DESTINATION \"share/lxqt/graphics" \ - --replace "DESTINATION \"\''${QT_PLUGINS_DIR}" "DESTINATION \"lib/qt5/plugins" \ + --replace "DESTINATION \"\''${QT_PLUGINS_DIR}" "DESTINATION \"$qtPluginPrefix" \ --replace "\''${LXQT_TRANSLATIONS_DIR}" share/lxqt/translations echo ============================ echo $file diff --git a/pkgs/desktops/plasma-5/bluedevil.nix b/pkgs/desktops/plasma-5/bluedevil.nix index d0e78499813..44e8a26eee1 100644 --- a/pkgs/desktops/plasma-5/bluedevil.nix +++ b/pkgs/desktops/plasma-5/bluedevil.nix @@ -1,17 +1,16 @@ { - plasmaPackage, extra-cmake-modules, shared_mime_info, + mkDerivation, extra-cmake-modules, shared_mime_info, bluez-qt, kcoreaddons, kdbusaddons, kded, ki18n, kiconthemes, kio, knotifications, kwidgetsaddons, kwindowsystem, plasma-framework, qtdeclarative }: -plasmaPackage { +mkDerivation { name = "bluedevil"; nativeBuildInputs = [ extra-cmake-modules shared_mime_info ]; - propagatedBuildInputs = [ + buildInputs = [ bluez-qt ki18n kio kwindowsystem plasma-framework qtdeclarative kcoreaddons kdbusaddons kded kiconthemes knotifications kwidgetsaddons ]; - propagatedUserEnvPkgs = [ bluez-qt.out ]; postInstall = '' # Fix the location of logic.js for the plasmoid ln -s $out/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/code/logic.js $out/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/logic.js diff --git a/pkgs/desktops/plasma-5/breeze-grub.nix b/pkgs/desktops/plasma-5/breeze-grub.nix index da0fb6f73ad..eed396b5437 100644 --- a/pkgs/desktops/plasma-5/breeze-grub.nix +++ b/pkgs/desktops/plasma-5/breeze-grub.nix @@ -1,10 +1,9 @@ { - plasmaPackage + mkDerivation }: -plasmaPackage { +mkDerivation { name = "breeze-grub"; - outputs = [ "out" ]; installPhase = '' runHook preInstall diff --git a/pkgs/desktops/plasma-5/breeze-gtk.nix b/pkgs/desktops/plasma-5/breeze-gtk.nix index 4048d98431d..cc51c4b0471 100644 --- a/pkgs/desktops/plasma-5/breeze-gtk.nix +++ b/pkgs/desktops/plasma-5/breeze-gtk.nix @@ -1,11 +1,14 @@ -{ plasmaPackage -, extra-cmake-modules -, qtbase -}: +{ mkDerivation, lib, extra-cmake-modules, gtk2, qtbase, }: -plasmaPackage { +let inherit (lib) getLib; in + +mkDerivation { name = "breeze-gtk"; nativeBuildInputs = [ extra-cmake-modules ]; - cmakeFlags = [ "-DWITH_GTK3_VERSION=3.20" ]; buildInputs = [ qtbase ]; + postPatch = '' + sed -i cmake/FindGTKEngine.cmake \ + -e "s|\''${KDE_INSTALL_FULL_LIBDIR}|${getLib gtk2}/lib|" + ''; + cmakeFlags = [ "-DWITH_GTK3_VERSION=3.22" ]; } diff --git a/pkgs/desktops/plasma-5/breeze-plymouth/default.nix b/pkgs/desktops/plasma-5/breeze-plymouth/default.nix index dfbdf48165a..41a4dd66b2c 100644 --- a/pkgs/desktops/plasma-5/breeze-plymouth/default.nix +++ b/pkgs/desktops/plasma-5/breeze-plymouth/default.nix @@ -1,14 +1,13 @@ { - plasmaPackage, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, extra-cmake-modules, plymouth }: -plasmaPackage { +mkDerivation { name = "breeze-plymouth"; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ plymouth ]; - outputs = [ "out" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); postPatch = '' substituteInPlace cmake/FindPlymouth.cmake --subst-var out diff --git a/pkgs/desktops/plasma-5/breeze-qt4.nix b/pkgs/desktops/plasma-5/breeze-qt4.nix index adcc6110c4d..6c31398037b 100644 --- a/pkgs/desktops/plasma-5/breeze-qt4.nix +++ b/pkgs/desktops/plasma-5/breeze-qt4.nix @@ -1,14 +1,15 @@ { - plasmaPackage, lib, + mkDerivation, lib, automoc4, cmake, perl, pkgconfig, kdelibs4, qt4, xproto }: -plasmaPackage { +mkDerivation { name = "breeze-qt4"; sname = "breeze"; buildInputs = [ kdelibs4 qt4 xproto ]; nativeBuildInputs = [ automoc4 cmake perl pkgconfig ]; + outputs = [ "out" "dev" ]; cmakeFlags = [ "-DUSE_KDE4=ON" "-DQT_QMAKE_EXECUTABLE=${qt4}/bin/qmake" diff --git a/pkgs/desktops/plasma-5/breeze-qt5.nix b/pkgs/desktops/plasma-5/breeze-qt5.nix index a1b64a4656c..c0e55dec76d 100644 --- a/pkgs/desktops/plasma-5/breeze-qt5.nix +++ b/pkgs/desktops/plasma-5/breeze-qt5.nix @@ -1,17 +1,20 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, frameworkintegration, kcmutils, kconfigwidgets, kcoreaddons, kdecoration, - kguiaddons, ki18n, kwayland, kwindowsystem, plasma-framework, qtx11extras + kguiaddons, ki18n, kwayland, kwindowsystem, plasma-framework, qtdeclarative, + qtx11extras }: -plasmaPackage { +mkDerivation { name = "breeze-qt5"; sname = "breeze"; nativeBuildInputs = [ extra-cmake-modules ]; propagatedBuildInputs = [ frameworkintegration kcmutils kconfigwidgets kcoreaddons kdecoration - kguiaddons ki18n kwayland kwindowsystem plasma-framework qtx11extras + kguiaddons ki18n kwayland kwindowsystem plasma-framework qtdeclarative + qtx11extras ]; + outputs = [ "out" "dev" "bin" ]; cmakeFlags = [ "-DUSE_Qt4=OFF" ]; } diff --git a/pkgs/desktops/plasma-5/build-support/package.nix b/pkgs/desktops/plasma-5/build-support/package.nix deleted file mode 100644 index 1e9ba016c47..00000000000 --- a/pkgs/desktops/plasma-5/build-support/package.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ kdeDerivation, lib, fetchurl }: - -let - mirror = "mirror://kde"; - srcs = import ../srcs.nix { inherit fetchurl mirror; }; -in - -args: - -let - inherit (args) name; - sname = args.sname or name; - inherit (srcs."${sname}") src version; -in -kdeDerivation (args // { - name = "${name}-${version}"; - inherit src; - - meta = { - license = with lib.licenses; [ - lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12 - ]; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ ttuegel ]; - homepage = "http://www.kde.org"; - } // (args.meta or {}); -}) diff --git a/pkgs/desktops/plasma-5/default.nix b/pkgs/desktops/plasma-5/default.nix index 1a8f1ed064b..e101d4e14c5 100644 --- a/pkgs/desktops/plasma-5/default.nix +++ b/pkgs/desktops/plasma-5/default.nix @@ -25,19 +25,71 @@ existing packages here and modify it as necessary. */ { - libsForQt5, kdeDerivation, lib, fetchurl, + libsForQt5, lib, fetchurl, gconf, debug ? false, }: let + srcs = import ./srcs.nix { + inherit fetchurl; + mirror = "mirror://kde"; + }; + + mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; + packages = self: with self; let + + propagate = out: + let setupHook = { writeScript }: + writeScript "setup-hook.sh" '' + # Propagate $${out} output + propagatedUserEnvPkgs+=" @${out}@" + + # Propagate $dev so that this setup hook is propagated + # But only if there is a separate $dev output + if [ "$outputDev" != out ]; then + if [ -n "$crossConfig" ]; then + propagatedBuildInputs+=" @dev@" + else + propagatedNativeBuildInputs+=" @dev@" + fi + fi + ''; + in callPackage setupHook {}; + + propagateBin = propagate "bin"; + callPackage = self.newScope { - plasmaPackage = import ./build-support/package.nix { - inherit kdeDerivation lib fetchurl; - }; + mkDerivation = args: + let + inherit (args) name; + sname = args.sname or name; + inherit (srcs."${sname}") src version; + + outputs = args.outputs or [ "out" ]; + hasBin = lib.elem "bin" outputs; + hasDev = lib.elem "dev" outputs; + + defaultSetupHook = if hasBin && hasDev then propagateBin else null; + setupHook = args.setupHook or defaultSetupHook; + + meta = { + license = with lib.licenses; [ + lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12 + ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ ttuegel ]; + homepage = "http://www.kde.org"; + } // (args.meta or {}); + in + mkDerivation (args // { + name = "${name}-${version}"; + inherit meta outputs setupHook src; + }); }; + in { bluedevil = callPackage ./bluedevil.nix {}; breeze-gtk = callPackage ./breeze-gtk.nix {}; diff --git a/pkgs/desktops/plasma-5/kactivitymanagerd.nix b/pkgs/desktops/plasma-5/kactivitymanagerd.nix index 282e58ecf9e..ae2736fde11 100644 --- a/pkgs/desktops/plasma-5/kactivitymanagerd.nix +++ b/pkgs/desktops/plasma-5/kactivitymanagerd.nix @@ -1,13 +1,14 @@ -{ plasmaPackage -, extra-cmake-modules -, boost, kconfig, kcoreaddons, kdbusaddons, ki18n, kio, kglobalaccel -, kwindowsystem, kxmlgui +{ + mkDerivation, + extra-cmake-modules, + boost, kconfig, kcoreaddons, kdbusaddons, ki18n, kio, kglobalaccel, + kwindowsystem, kxmlgui }: -plasmaPackage { +mkDerivation { name = "kactivitymanagerd"; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ + buildInputs = [ boost kconfig kcoreaddons kdbusaddons kglobalaccel ki18n kio kwindowsystem kxmlgui ]; diff --git a/pkgs/desktops/plasma-5/kde-cli-tools.nix b/pkgs/desktops/plasma-5/kde-cli-tools.nix index 87a46703997..6bcafc5813a 100644 --- a/pkgs/desktops/plasma-5/kde-cli-tools.nix +++ b/pkgs/desktops/plasma-5/kde-cli-tools.nix @@ -1,14 +1,14 @@ { - plasmaPackage, extra-cmake-modules, - kcmutils, kconfig, kdelibs4support, kdesu, kdoctools, ki18n, kiconthemes, - kwindowsystem, qtsvg, qtx11extras + mkDerivation, extra-cmake-modules, kdoctools, + kcmutils, kconfig, kdesu, ki18n, kiconthemes, kinit, kio, kwindowsystem, + qtsvg, qtx11extras, }: -plasmaPackage { +mkDerivation { name = "kde-cli-tools"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kcmutils kconfig kdesu kdelibs4support ki18n kiconthemes kwindowsystem qtsvg + buildInputs = [ + kcmutils kconfig kdesu ki18n kiconthemes kinit kio kwindowsystem qtsvg qtx11extras ]; } diff --git a/pkgs/desktops/plasma-5/kde-gtk-config/default.nix b/pkgs/desktops/plasma-5/kde-gtk-config/default.nix index f482f2a6a3f..38bab58c829 100644 --- a/pkgs/desktops/plasma-5/kde-gtk-config/default.nix +++ b/pkgs/desktops/plasma-5/kde-gtk-config/default.nix @@ -1,25 +1,18 @@ -{ plasmaPackage -, extra-cmake-modules -, glib -, gtk2 -, gtk3 -, karchive -, kcmutils -, kconfigwidgets -, ki18n -, kiconthemes -, kio -, knewstuff +{ + mkDerivation, + extra-cmake-modules, + glib, gtk2, gtk3, karchive, kcmutils, kconfigwidgets, ki18n, kiconthemes, kio, + knewstuff }: -plasmaPackage { +mkDerivation { name = "kde-gtk-config"; - patches = [ ./0001-follow-symlinks.patch ]; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ + buildInputs = [ ki18n kio glib gtk2 gtk3 karchive kcmutils kconfigwidgets kiconthemes knewstuff ]; + patches = [ ./0001-follow-symlinks.patch ]; cmakeFlags = [ "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" diff --git a/pkgs/desktops/plasma-5/kdecoration.nix b/pkgs/desktops/plasma-5/kdecoration.nix index 546f72c3f38..d8f996421ac 100644 --- a/pkgs/desktops/plasma-5/kdecoration.nix +++ b/pkgs/desktops/plasma-5/kdecoration.nix @@ -1,7 +1,8 @@ -{ plasmaPackage, extra-cmake-modules, qtbase }: +{ mkDerivation, extra-cmake-modules, qtbase }: -plasmaPackage { +mkDerivation { name = "kdecoration"; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/desktops/plasma-5/kdeplasma-addons.nix b/pkgs/desktops/plasma-5/kdeplasma-addons.nix index 3371e17beaf..b9f40563ef6 100644 --- a/pkgs/desktops/plasma-5/kdeplasma-addons.nix +++ b/pkgs/desktops/plasma-5/kdeplasma-addons.nix @@ -1,20 +1,17 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools -, kconfig, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, ki18n -, kio, knewstuff, kross, krunner, kservice, ksysguard, kunitconversion -, plasma-framework, plasma-workspace, qtdeclarative, qtx11extras -, ibus +{ + mkDerivation, + extra-cmake-modules, kdoctools, + kconfig, kconfigwidgets, kcoreaddons, kcmutils, kdelibs4support, ki18n, kio, + knewstuff, kross, krunner, kservice, ksysguard, kunitconversion, ibus, + plasma-framework, plasma-workspace, qtdeclarative, qtx11extras, }: -plasmaPackage { +mkDerivation { name = "kdeplasma-addons"; - nativeBuildInputs = [ - extra-cmake-modules - kdoctools - ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ kconfig kconfigwidgets kcoreaddons kcmutils kdelibs4support kio knewstuff - kross krunner kservice ksysguard kunitconversion plasma-framework + kross krunner kservice ksysguard kunitconversion ibus plasma-framework plasma-workspace qtdeclarative qtx11extras - ibus ]; } diff --git a/pkgs/desktops/plasma-5/kgamma5.nix b/pkgs/desktops/plasma-5/kgamma5.nix index 965c33e6eef..ea58cad12ae 100644 --- a/pkgs/desktops/plasma-5/kgamma5.nix +++ b/pkgs/desktops/plasma-5/kgamma5.nix @@ -1,9 +1,11 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools, kdelibs4support -, qtx11extras +{ + mkDerivation, + extra-cmake-modules, kdoctools, + kconfig, kconfigwidgets, ki18n, qtx11extras, }: -plasmaPackage { +mkDerivation { name = "kgamma5"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kdelibs4support qtx11extras ]; + buildInputs = [ kconfig kconfigwidgets ki18n qtx11extras ]; } diff --git a/pkgs/desktops/plasma-5/khotkeys.nix b/pkgs/desktops/plasma-5/khotkeys.nix index 2b02e5916b9..abfb85a867c 100644 --- a/pkgs/desktops/plasma-5/khotkeys.nix +++ b/pkgs/desktops/plasma-5/khotkeys.nix @@ -1,14 +1,16 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools, kcmutils -, kdbusaddons, kdelibs4support, kglobalaccel, ki18n, kio, kxmlgui -, plasma-framework, plasma-workspace, qtx11extras -, fetchpatch +{ + mkDerivation, + extra-cmake-modules, kdoctools, + kcmutils, kdbusaddons, kdelibs4support, kglobalaccel, ki18n, kio, kxmlgui, + plasma-framework, plasma-workspace, qtx11extras }: -plasmaPackage { +mkDerivation { name = "khotkeys"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kdelibs4support kglobalaccel ki18n kio plasma-framework plasma-workspace - qtx11extras kcmutils kdbusaddons kxmlgui + buildInputs = [ + kcmutils kdbusaddons kdelibs4support kglobalaccel ki18n kio kxmlgui + plasma-framework plasma-workspace qtx11extras ]; + outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/desktops/plasma-5/kinfocenter.nix b/pkgs/desktops/plasma-5/kinfocenter.nix index b4c8dc99adc..d366aa4b36e 100644 --- a/pkgs/desktops/plasma-5/kinfocenter.nix +++ b/pkgs/desktops/plasma-5/kinfocenter.nix @@ -1,15 +1,15 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, kdoctools, kcmutils, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kpackage, kservice, kwayland, kwidgetsaddons, kxmlgui, libraw1394, mesa_glu, pciutils, solid }: -plasmaPackage { +mkDerivation { name = "kinfocenter"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons kdeclarative kdelibs4support ki18n kiconthemes kio kpackage kservice kwayland kwidgetsaddons kxmlgui libraw1394 mesa_glu pciutils solid diff --git a/pkgs/desktops/plasma-5/kmenuedit.nix b/pkgs/desktops/plasma-5/kmenuedit.nix index a27dc5dd92a..016ea940d99 100644 --- a/pkgs/desktops/plasma-5/kmenuedit.nix +++ b/pkgs/desktops/plasma-5/kmenuedit.nix @@ -1,14 +1,14 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, kdoctools, kdbusaddons, kdelibs4support, khotkeys, ki18n, kiconthemes, kio, kxmlgui, sonnet }: -plasmaPackage { +mkDerivation { name = "kmenuedit"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kdbusaddons kdelibs4support khotkeys ki18n kiconthemes kio kxmlgui sonnet ]; } diff --git a/pkgs/desktops/plasma-5/kscreen.nix b/pkgs/desktops/plasma-5/kscreen.nix index e0fbea5d746..7fdaedbb78d 100644 --- a/pkgs/desktops/plasma-5/kscreen.nix +++ b/pkgs/desktops/plasma-5/kscreen.nix @@ -1,13 +1,15 @@ -{ plasmaPackage, extra-cmake-modules, kconfig, kconfigwidgets -, kdbusaddons, kglobalaccel, ki18n, kwidgetsaddons, kxmlgui -, libkscreen, qtdeclarative, qtgraphicaleffects +{ + mkDerivation, + extra-cmake-modules, + kconfig, kconfigwidgets, kdbusaddons, kglobalaccel, ki18n, kwidgetsaddons, + kxmlgui, libkscreen, qtdeclarative, qtgraphicaleffects }: -plasmaPackage { +mkDerivation { name = "kscreen"; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kglobalaccel ki18n libkscreen qtdeclarative qtgraphicaleffects kconfig - kconfigwidgets kdbusaddons kwidgetsaddons kxmlgui + buildInputs = [ + kconfig kconfigwidgets kdbusaddons kglobalaccel ki18n kwidgetsaddons kxmlgui + libkscreen qtdeclarative qtgraphicaleffects ]; } diff --git a/pkgs/desktops/plasma-5/kscreenlocker.nix b/pkgs/desktops/plasma-5/kscreenlocker.nix index 3551feab76f..e748121132c 100644 --- a/pkgs/desktops/plasma-5/kscreenlocker.nix +++ b/pkgs/desktops/plasma-5/kscreenlocker.nix @@ -1,15 +1,17 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, kdoctools, kcmutils, kcrash, kdeclarative, kdelibs4support, kglobalaccel, kidletime, - kwayland, libXcursor, pam, plasma-framework, qtdeclarative, wayland + kwayland, libXcursor, pam, plasma-framework, qtdeclarative, qtx11extras, + wayland, }: -plasmaPackage { +mkDerivation { name = "kscreenlocker"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kcmutils kcrash kdeclarative kdelibs4support kglobalaccel kidletime kwayland - libXcursor pam plasma-framework qtdeclarative wayland + libXcursor pam plasma-framework qtdeclarative qtx11extras wayland ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/desktops/plasma-5/ksshaskpass.nix b/pkgs/desktops/plasma-5/ksshaskpass.nix index f1a6b82ae93..39e260f6c70 100644 --- a/pkgs/desktops/plasma-5/ksshaskpass.nix +++ b/pkgs/desktops/plasma-5/ksshaskpass.nix @@ -1,9 +1,11 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools, kcoreaddons -, ki18n, kwallet, kwidgetsaddons +{ + mkDerivation, + extra-cmake-modules, kdoctools, + kcoreaddons, ki18n, kwallet, kwidgetsaddons, qtbase, }: -plasmaPackage { +mkDerivation { name = "ksshaskpass"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kcoreaddons ki18n kwallet kwidgetsaddons ]; + buildInputs = [ kcoreaddons ki18n kwallet kwidgetsaddons qtbase ]; } diff --git a/pkgs/desktops/plasma-5/ksysguard.nix b/pkgs/desktops/plasma-5/ksysguard.nix index 366b154cae7..150b97be50d 100644 --- a/pkgs/desktops/plasma-5/ksysguard.nix +++ b/pkgs/desktops/plasma-5/ksysguard.nix @@ -1,17 +1,16 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, kdoctools, lm_sensors, kconfig, kcoreaddons, kdelibs4support, ki18n, kiconthemes, kitemviews, knewstuff, libksysguard, qtwebkit }: -plasmaPackage { +mkDerivation { name = "ksysguard"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - buildInputs = [ lm_sensors ]; - propagatedBuildInputs = [ + buildInputs = [ kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard - kdelibs4support ki18n qtwebkit + kdelibs4support ki18n lm_sensors qtwebkit ]; } diff --git a/pkgs/desktops/plasma-5/kwallet-pam.nix b/pkgs/desktops/plasma-5/kwallet-pam.nix index 2789499c50a..1cbfb87ea56 100644 --- a/pkgs/desktops/plasma-5/kwallet-pam.nix +++ b/pkgs/desktops/plasma-5/kwallet-pam.nix @@ -1,11 +1,10 @@ -{ plasmaPackage, extra-cmake-modules, pam, socat, libgcrypt -}: +{ mkDerivation, lib, extra-cmake-modules, pam, socat, libgcrypt, qtbase, }: -plasmaPackage { +mkDerivation { name = "kwallet-pam"; - nativeBuildInputs = [ extra-cmake-modules ]; - - buildInputs = [ pam socat libgcrypt ]; - + buildInputs = [ pam socat libgcrypt qtbase ]; + postPatch = '' + sed -i pam_kwallet_init -e "s|socat|${lib.getBin socat}/bin/socat|" + ''; } diff --git a/pkgs/desktops/plasma-5/kwayland-integration.nix b/pkgs/desktops/plasma-5/kwayland-integration.nix index 9045227a51a..1344b477f73 100644 --- a/pkgs/desktops/plasma-5/kwayland-integration.nix +++ b/pkgs/desktops/plasma-5/kwayland-integration.nix @@ -1,16 +1,11 @@ -{ plasmaPackage -, extra-cmake-modules -, kidletime -, kwayland -, kwindowsystem +{ + mkDerivation, + extra-cmake-modules, + kidletime, kwayland, kwindowsystem, qtbase, }: -plasmaPackage { +mkDerivation { name = "kwayland-integration"; - nativeBuildInputs = [ - extra-cmake-modules - ]; - propagatedBuildInputs = [ - kidletime kwindowsystem kwayland - ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ kidletime kwindowsystem kwayland qtbase ]; } diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix index a14b6433a76..09708b65487 100644 --- a/pkgs/desktops/plasma-5/kwin/default.nix +++ b/pkgs/desktops/plasma-5/kwin/default.nix @@ -1,41 +1,45 @@ { - plasmaPackage, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, extra-cmake-modules, kdoctools, - breeze-qt5, epoxy, kactivities, kcompletion, kcmutils, kconfig, - kconfigwidgets, kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, - ki18n, kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, - kpackage, kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem, - kxmlgui, libICE, libSM, libinput, libxkbcommon, plasma-framework, - qtdeclarative, qtmultimedia, qtscript, qtx11extras, udev, wayland, - xcb-util-cursor, xwayland + + epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor, + xwayland, + + qtdeclarative, qtmultimedia, qtscript, qtx11extras, + + breeze-qt5, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets, + kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, ki18n, + kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, kpackage, + kscreenlocker, kservice, kwayland, kwidgetsaddons, kwindowsystem, kxmlgui, + plasma-framework, }: -plasmaPackage { +mkDerivation { name = "kwin"; - nativeBuildInputs = [ - extra-cmake-modules - kdoctools - ]; - propagatedBuildInputs = [ - breeze-qt5 epoxy kactivities kcmutils kcompletion kconfig kconfigwidgets + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + epoxy libICE libSM libinput libxkbcommon udev wayland xcb-util-cursor + xwayland + + qtdeclarative qtmultimedia qtscript qtx11extras + + breeze-qt5 kactivities kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes kidletime kinit kio knewstuff knotifications kpackage kscreenlocker kservice - kwayland kwidgetsaddons kwindowsystem kxmlgui libICE libSM libxkbcommon - libinput plasma-framework qtdeclarative qtmultimedia qtscript qtx11extras - udev wayland xcb-util-cursor xwayland + kwayland kwidgetsaddons kwindowsystem kxmlgui plasma-framework ]; + outputs = [ "out" "dev" "bin" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); - postPatch = '' - substituteInPlace main_wayland.cpp \ - --subst-var-by xwayland ${lib.getBin xwayland}/bin/Xwayland - ''; + NIX_CFLAGS_COMPILE = [ + ''-DNIXPKGS_XWAYLAND="${lib.getBin xwayland}/bin/Xwayland"'' + ]; cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; postInstall = '' # Some package(s) refer to these service types by the wrong name. # I would prefer to patch those packages, but I cannot find them! - ln -s $out/share/kservicetypes5/kwineffect.desktop \ - $out/share/kservicetypes5/kwin-effect.desktop - ln -s $out/share/kservicetypes5/kwinscript.desktop \ - $out/share/kservicetypes5/kwin-script.desktop + ln -s ''${!outputBin}/share/kservicetypes5/kwineffect.desktop \ + ''${!outputBin}/share/kservicetypes5/kwin-effect.desktop + ln -s ''${!outputBin}/share/kservicetypes5/kwinscript.desktop \ + ''${!outputBin}/share/kservicetypes5/kwin-script.desktop ''; } diff --git a/pkgs/desktops/plasma-5/kwin/xwayland.patch b/pkgs/desktops/plasma-5/kwin/xwayland.patch index 5fde01d08bf..51f15c87d27 100644 --- a/pkgs/desktops/plasma-5/kwin/xwayland.patch +++ b/pkgs/desktops/plasma-5/kwin/xwayland.patch @@ -7,7 +7,7 @@ Index: kwin-5.7.3/main_wayland.cpp m_xwaylandProcess = new Process(kwinApp()); m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); - m_xwaylandProcess->setProgram(QStringLiteral("Xwayland")); -+ m_xwaylandProcess->setProgram(QStringLiteral("@xwayland@")); ++ m_xwaylandProcess->setProgram(QLatin1String(NIXPKGS_XWAYLAND)); QProcessEnvironment env = m_environment; env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd)); m_xwaylandProcess->setProcessEnvironment(env); diff --git a/pkgs/desktops/plasma-5/kwrited.nix b/pkgs/desktops/plasma-5/kwrited.nix index 29498e93404..f6f6187e946 100644 --- a/pkgs/desktops/plasma-5/kwrited.nix +++ b/pkgs/desktops/plasma-5/kwrited.nix @@ -1,9 +1,11 @@ -{ plasmaPackage, extra-cmake-modules, kcoreaddons, ki18n, kpty -, knotifications, kdbusaddons +{ + mkDerivation, + extra-cmake-modules, + kcoreaddons, kdbusaddons, ki18n, knotifications, kpty, qtbase, }: -plasmaPackage { +mkDerivation { name = "kwrited"; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kcoreaddons ki18n kpty knotifications kdbusaddons ]; + buildInputs = [ kcoreaddons kdbusaddons ki18n knotifications kpty qtbase ]; } diff --git a/pkgs/desktops/plasma-5/libkscreen/default.nix b/pkgs/desktops/plasma-5/libkscreen/default.nix index afb2c20e90c..b81755ed757 100644 --- a/pkgs/desktops/plasma-5/libkscreen/default.nix +++ b/pkgs/desktops/plasma-5/libkscreen/default.nix @@ -1,19 +1,16 @@ -{ plasmaPackage, lib, copyPathsToStore -, extra-cmake-modules -, kwayland, libXrandr -, qtx11extras +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, + kwayland, libXrandr, qtx11extras }: -plasmaPackage { +mkDerivation { name = "libkscreen"; - nativeBuildInputs = [ - extra-cmake-modules - ]; - propagatedBuildInputs = [ - kwayland libXrandr qtx11extras - ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ kwayland libXrandr qtx11extras ]; + outputs = [ "out" "dev" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); preConfigure = '' - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputLib}/lib/qt5/plugins/kf5/kscreen\"" + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputBin}/$qtPluginPrefix/kf5/kscreen\"" ''; } diff --git a/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch b/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch index 9d3cf49b9cd..48be0d037df 100644 --- a/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch +++ b/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch @@ -17,7 +17,7 @@ Index: libkscreen-5.9.4/src/backendmanager.cpp - finfos.append(dir.entryInfoList()); - } - return finfos; -+ const QDir dir(QStringLiteral(NIXPKGS_LIBKSCREEN_BACKENDS), ++ const QDir dir(QLatin1String(NIXPKGS_LIBKSCREEN_BACKENDS), + QStringLiteral("KSC_*"), + QDir::SortFlags(QDir::QDir::Name), + QDir::NoDotAndDotDot | QDir::Files); diff --git a/pkgs/desktops/plasma-5/libksysguard/default.nix b/pkgs/desktops/plasma-5/libksysguard/default.nix index b67e041a782..4e88cd3df0e 100644 --- a/pkgs/desktops/plasma-5/libksysguard/default.nix +++ b/pkgs/desktops/plasma-5/libksysguard/default.nix @@ -1,20 +1,21 @@ { - plasmaPackage, + mkDerivation, extra-cmake-modules, kauth, kcompletion, kconfig, kconfigwidgets, kcoreaddons, ki18n, kiconthemes, kservice, kwidgetsaddons, kwindowsystem, plasma-framework, qtscript, qtwebkit, qtx11extras }: -plasmaPackage { +mkDerivation { name = "libksysguard"; patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ + buildInputs = [ kauth kconfig ki18n kiconthemes kwindowsystem kcompletion kconfigwidgets kcoreaddons kservice kwidgetsaddons plasma-framework qtscript qtx11extras qtwebkit ]; + outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/desktops/plasma-5/milou.nix b/pkgs/desktops/plasma-5/milou.nix index 43f78d9e2a9..fa4ad3fcd29 100644 --- a/pkgs/desktops/plasma-5/milou.nix +++ b/pkgs/desktops/plasma-5/milou.nix @@ -1,15 +1,15 @@ -{ plasmaPackage, extra-cmake-modules, qtscript, qtdeclarative -, kcoreaddons, ki18n, kdeclarative, kservice, plasma-framework -, krunner +{ + mkDerivation, + extra-cmake-modules, + kcoreaddons, kdeclarative, ki18n, krunner, kservice, plasma-framework, + qtscript, qtdeclarative, }: -plasmaPackage { +mkDerivation { name = "milou"; - nativeBuildInputs = [ - extra-cmake-modules - ]; - propagatedBuildInputs = [ - kdeclarative ki18n krunner plasma-framework qtdeclarative qtscript - kcoreaddons kservice + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ + kcoreaddons kdeclarative ki18n krunner kservice plasma-framework + qtdeclarative qtscript ]; } diff --git a/pkgs/desktops/plasma-5/oxygen.nix b/pkgs/desktops/plasma-5/oxygen.nix index b4ff775264f..97421191d90 100644 --- a/pkgs/desktops/plasma-5/oxygen.nix +++ b/pkgs/desktops/plasma-5/oxygen.nix @@ -1,21 +1,18 @@ { - plasmaPackage, kdeWrapper, + mkDerivation, extra-cmake-modules, frameworkintegration, kcmutils, kcompletion, kconfig, kdecoration, kguiaddons, - ki18n, kwidgetsaddons, kservice, kwayland, kwindowsystem, qtx11extras + ki18n, kwidgetsaddons, kservice, kwayland, kwindowsystem, qtdeclarative, + qtx11extras }: -let - unwrapped = plasmaPackage { - name = "oxygen"; - nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - frameworkintegration kcmutils kcompletion kconfig kdecoration kguiaddons - ki18n kservice kwayland kwidgetsaddons kwindowsystem qtx11extras - ]; - }; -in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/oxygen-demo5" "bin/oxygen-settings5" ]; +mkDerivation { + name = "oxygen"; + nativeBuildInputs = [ extra-cmake-modules ]; + propagatedBuildInputs = [ + frameworkintegration kcmutils kcompletion kconfig kdecoration kguiaddons + ki18n kservice kwayland kwidgetsaddons kwindowsystem qtdeclarative + qtx11extras + ]; + outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/desktops/plasma-5/plasma-desktop/default.nix b/pkgs/desktops/plasma-5/plasma-desktop/default.nix index 1c152500b6a..18675159df6 100644 --- a/pkgs/desktops/plasma-5/plasma-desktop/default.nix +++ b/pkgs/desktops/plasma-5/plasma-desktop/default.nix @@ -1,45 +1,50 @@ { - plasmaPackage, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, extra-cmake-modules, kdoctools, - attica, baloo, boost, fontconfig, ibus, kactivities, kactivities-stats, kauth, - kcmutils, kdbusaddons, kdeclarative, kded, kdelibs4support, kemoticons, - kglobalaccel, ki18n, kitemmodels, knewstuff, knotifications, knotifyconfig, - kpeople, krunner, ksysguard, kwallet, kwin, libXcursor, libXft, - libcanberra_kde, libpulseaudio, libxkbfile, phonon, plasma-framework, - plasma-workspace, qtdeclarative, qtquickcontrols, qtquickcontrols2, qtsvg, - qtx11extras, xf86inputevdev, xf86inputsynaptics, xinput, xkeyboard_config, - xorgserver, - utillinux + + boost, fontconfig, ibus, libXcursor, libXft, libcanberra_kde, libpulseaudio, + libxkbfile, xf86inputevdev, xf86inputsynaptics, xinput, xkeyboard_config, + xorgserver, utillinux, + + qtdeclarative, qtquickcontrols, qtquickcontrols2, qtsvg, qtx11extras, + + attica, baloo, kactivities, kactivities-stats, kauth, kcmutils, kdbusaddons, + kdeclarative, kded, kdelibs4support, kemoticons, kglobalaccel, ki18n, + kitemmodels, knewstuff, knotifications, knotifyconfig, kpeople, krunner, + kscreenlocker, ksysguard, kwallet, kwin, phonon, plasma-framework, + plasma-workspace, }: -plasmaPackage rec { +mkDerivation rec { name = "plasma-desktop"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; buildInputs = [ - attica boost fontconfig ibus kcmutils kdbusaddons kded kitemmodels knewstuff - knotifications knotifyconfig kwallet libcanberra_kde libXcursor - libpulseaudio libXft libxkbfile phonon qtsvg xf86inputevdev - xf86inputsynaptics xkeyboard_config xinput baloo kactivities - kactivities-stats kauth kdeclarative kdelibs4support kemoticons kglobalaccel - ki18n kpeople krunner kwin plasma-framework plasma-workspace qtdeclarative - qtquickcontrols qtquickcontrols2 qtx11extras ksysguard + boost fontconfig ibus libcanberra_kde libpulseaudio libXcursor libXft + libxkbfile phonon xf86inputevdev xf86inputsynaptics xinput xkeyboard_config + + qtdeclarative qtquickcontrols qtquickcontrols2 qtsvg qtx11extras + + attica baloo kactivities kactivities-stats kauth kcmutils kdbusaddons + kdeclarative kded kdelibs4support kemoticons kglobalaccel ki18n kitemmodels + knewstuff knotifications knotifyconfig kpeople krunner kscreenlocker + ksysguard kwallet kwin plasma-framework plasma-workspace ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); postPatch = '' - substituteInPlace kcms/dateandtime/helper.cpp \ - --subst-var hwclock "${utillinux}/sbin/hwclock" - sed '1i#include ' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp ''; - NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ]; + NIX_CFLAGS_COMPILE = [ + "-I${lib.getDev xorgserver}/include/xorg" + ''-DNIXPKGS_HWCLOCK="${lib.getBin utillinux}/sbin/hwclock"'' + ]; cmakeFlags = [ - "-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg" - "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics.dev}/include/xorg" + "-DEvdev_INCLUDE_DIRS=${lib.getDev xf86inputevdev}/include/xorg" + "-DSynaptics_INCLUDE_DIRS=${lib.getDev xf86inputsynaptics}/include/xorg" ]; postInstall = '' # Display ~/Desktop contents on the desktop by default. - sed -i "$out/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \ + sed -i "''${!outputBin}/share/plasma/shells/org.kde.plasma.desktop/contents/defaults" \ -e 's/Containment=org.kde.desktopcontainment/Containment=org.kde.plasma.folder/' ''; } diff --git a/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch b/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch index 5623de84668..a46212af10f 100644 --- a/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch +++ b/pkgs/desktops/plasma-5/plasma-desktop/hwclock-path.patch @@ -18,7 +18,7 @@ Index: plasma-desktop-5.8.5/kcms/dateandtime/helper.cpp void ClockHelper::toHwclock() { - QString hwclock = KStandardDirs::findExe(QStringLiteral("hwclock"), exePath); -+ QString hwclock = "@hwclock@"; ++ QString hwclock = QLatin1String(NIXPKGS_HWCLOCK); if (!hwclock.isEmpty()) { KProcess::execute(hwclock, QStringList() << QStringLiteral("--systohc")); } diff --git a/pkgs/desktops/plasma-5/plasma-integration.nix b/pkgs/desktops/plasma-5/plasma-integration.nix index 97d30dcd773..de46bb4373c 100644 --- a/pkgs/desktops/plasma-5/plasma-integration.nix +++ b/pkgs/desktops/plasma-5/plasma-integration.nix @@ -1,17 +1,17 @@ -{ plasmaPackage, extra-cmake-modules -, breeze-qt5, kconfig, kconfigwidgets, kiconthemes, kio, kwayland -, libXcursor +{ + mkDerivation, + extra-cmake-modules, + breeze-qt5, kconfig, kconfigwidgets, kiconthemes, kio, knotifications, + kwayland, libXcursor }: # TODO: install Noto Sans and Oxygen Mono fonts with plasma-integration -plasmaPackage { +mkDerivation { name = "plasma-integration"; - nativeBuildInputs = [ - extra-cmake-modules - ]; + nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ - breeze-qt5 kconfig kconfigwidgets kiconthemes kio kwayland + breeze-qt5 kconfig kconfigwidgets kiconthemes kio knotifications kwayland libXcursor ]; } diff --git a/pkgs/desktops/plasma-5/plasma-nm/default.nix b/pkgs/desktops/plasma-5/plasma-nm/default.nix index 736d59b4041..cc1dcb7ee9f 100644 --- a/pkgs/desktops/plasma-5/plasma-nm/default.nix +++ b/pkgs/desktops/plasma-5/plasma-nm/default.nix @@ -1,14 +1,23 @@ -{ plasmaPackage, substituteAll, extra-cmake-modules, kdoctools -, kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative -, kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews -, knotifications, kservice, kwallet, kwidgetsaddons, kwindowsystem -, kxmlgui, mobile_broadband_provider_info -, modemmanager-qt, networkmanager-qt, openconnect, plasma-framework -, qca-qt5, qtdeclarative, solid, openvpn +{ + mkDerivation, substituteAll, + extra-cmake-modules, kdoctools, + kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative, + kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews, knotifications, + kservice, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui, + mobile_broadband_provider_info, modemmanager-qt, networkmanager-qt, + openconnect, openvpn, plasma-framework, qca-qt5, qtdeclarative, qttools, solid }: -plasmaPackage { +mkDerivation { name = "plasma-nm"; + nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ]; + buildInputs = [ + kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework + qtdeclarative kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes + kinit kitemviews knotifications kservice kwallet kwidgetsaddons kxmlgui + mobile_broadband_provider_info modemmanager-qt networkmanager-qt openconnect + qca-qt5 solid + ]; patches = [ (substituteAll { src = ./0001-mobile-broadband-provider-info-path.patch; @@ -19,13 +28,4 @@ plasmaPackage { inherit openvpn; }) ]; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework - qtdeclarative kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes - kinit kitemviews knotifications kservice kwallet kwidgetsaddons kxmlgui - mobile_broadband_provider_info modemmanager-qt networkmanager-qt openconnect - qca-qt5 solid - ]; - enableParallelBuilding = true; } diff --git a/pkgs/desktops/plasma-5/plasma-pa.nix b/pkgs/desktops/plasma-5/plasma-pa.nix index f398e1a9efc..50f53d70a98 100644 --- a/pkgs/desktops/plasma-5/plasma-pa.nix +++ b/pkgs/desktops/plasma-5/plasma-pa.nix @@ -1,17 +1,15 @@ { - plasmaPackage, - extra-cmake-modules, - gconf, glib, kdoctools, kconfigwidgets, kcoreaddons, kdeclarative, kglobalaccel, - ki18n, libcanberra_gtk3, libpulseaudio, plasma-framework + mkDerivation, + extra-cmake-modules, kdoctools, + gconf, glib, kconfigwidgets, kcoreaddons, kdeclarative, kglobalaccel, ki18n, + libcanberra_gtk3, libpulseaudio, plasma-framework, qtdeclarative }: -plasmaPackage { +mkDerivation { name = "plasma-pa"; - nativeBuildInputs = [ - extra-cmake-modules kdoctools - ]; - propagatedBuildInputs = [ - gconf glib kconfigwidgets kcoreaddons kdeclarative - kglobalaccel ki18n libcanberra_gtk3 libpulseaudio plasma-framework + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + gconf glib kconfigwidgets kcoreaddons kdeclarative kglobalaccel ki18n + libcanberra_gtk3 libpulseaudio plasma-framework qtdeclarative ]; } diff --git a/pkgs/desktops/plasma-5/plasma-workspace-wallpapers.nix b/pkgs/desktops/plasma-5/plasma-workspace-wallpapers.nix index 8af9caaa579..cb068166c1d 100644 --- a/pkgs/desktops/plasma-5/plasma-workspace-wallpapers.nix +++ b/pkgs/desktops/plasma-5/plasma-workspace-wallpapers.nix @@ -1,11 +1,6 @@ -{ plasmaPackage -, extra-cmake-modules -}: +{ mkDerivation , extra-cmake-modules }: -plasmaPackage { +mkDerivation { name = "plasma-workspace-wallpapers"; - outputs = [ "out" ]; - nativeBuildInputs = [ - extra-cmake-modules - ]; + nativeBuildInputs = [ extra-cmake-modules ]; } diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix index 8759c7d8c1e..29d92f9a9df 100644 --- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix +++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix @@ -1,44 +1,47 @@ { - plasmaPackage, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, extra-cmake-modules, kdoctools, + isocodes, libdbusmenu, libSM, libXcursor, pam, wayland, + baloo, kactivities, kcmutils, kconfig, kcrash, kdbusaddons, kdeclarative, kdelibs4support, kdesu, kglobalaccel, kidletime, kjsembed, knewstuff, - knotifyconfig, kpackage, krunner, ktexteditor, ktextwidgets, kwallet, - kwayland, kwin, kxmlrpcclient, libkscreen, libksysguard, networkmanager-qt, - phonon, plasma-framework, qtgraphicaleffects, qtquickcontrols, - qtquickcontrols2, qtscript, qtx11extras, solid, isocodes, libdbusmenu, libSM, - libXcursor, pam, wayland + knotifyconfig, kpackage, krunner, kscreenlocker, ktexteditor, ktextwidgets, + kwallet, kwayland, kwin, kxmlrpcclient, libkscreen, libksysguard, + networkmanager-qt, phonon, plasma-framework, prison, solid, + + qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, qtscript, qtx11extras, }: -plasmaPackage { +mkDerivation { name = "plasma-workspace"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; buildInputs = [ isocodes libdbusmenu libSM libXcursor pam wayland - ]; - propagatedBuildInputs = [ + baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff - knotifyconfig kpackage krunner ktexteditor ktextwidgets kwallet kwayland - kwin kxmlrpcclient libkscreen libksysguard networkmanager-qt phonon - plasma-framework solid qtgraphicaleffects qtquickcontrols qtquickcontrols2 - qtscript qtx11extras + knotifyconfig kpackage krunner kscreenlocker ktexteditor ktextwidgets + kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard + networkmanager-qt phonon plasma-framework prison solid + + qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtx11extras ]; + outputs = [ "out" "dev" "bin" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); postPatch = '' substituteInPlace startkde/kstartupconfig/kstartupconfig.cpp \ - --replace kdostartupconfig5 $out/bin/kdostartupconfig5 + --replace kdostartupconfig5 ''${!outputBin}/bin/kdostartupconfig5 ''; postInstall = '' - rm "$out/bin/startkde" - rm "$out/bin/startplasmacompositor" - rm "$out/lib/libexec/startplasma" - rm -r "$out/share/wayland-sessions" + rm "''${!outputBin}/bin/startkde" + rm "''${!outputBin}/bin/startplasmacompositor" + rm "''${!outputLib}/lib/libexec/startplasma" + rm -r "''${!outputBin}/share/wayland-sessions" ''; } diff --git a/pkgs/desktops/plasma-5/polkit-kde-agent.nix b/pkgs/desktops/plasma-5/polkit-kde-agent.nix index 1d7d20a7ffb..bd3e5d6e1f4 100644 --- a/pkgs/desktops/plasma-5/polkit-kde-agent.nix +++ b/pkgs/desktops/plasma-5/polkit-kde-agent.nix @@ -1,10 +1,10 @@ { - plasmaPackage, extra-cmake-modules, + mkDerivation, extra-cmake-modules, kcoreaddons, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, knotifications, kwidgetsaddons, kwindowsystem, polkit-qt }: -plasmaPackage { +mkDerivation { name = "polkit-kde-agent"; nativeBuildInputs = [ extra-cmake-modules ]; propagatedBuildInputs = [ diff --git a/pkgs/desktops/plasma-5/powerdevil.nix b/pkgs/desktops/plasma-5/powerdevil.nix index c3469cc2ebc..65fc5446c16 100644 --- a/pkgs/desktops/plasma-5/powerdevil.nix +++ b/pkgs/desktops/plasma-5/powerdevil.nix @@ -1,13 +1,15 @@ -{ plasmaPackage, extra-cmake-modules, kdoctools, bluez-qt, kactivities -, kauth, kconfig, kdbusaddons, kdelibs4support, kglobalaccel, ki18n -, kidletime, kio, knotifyconfig, kwayland, libkscreen, networkmanager-qt -, plasma-workspace, qtx11extras, solid, udev +{ + mkDerivation, + extra-cmake-modules, kdoctools, + bluez-qt, kactivities, kauth, kconfig, kdbusaddons, kdelibs4support, + kglobalaccel, ki18n, kidletime, kio, knotifyconfig, kwayland, libkscreen, + networkmanager-qt, plasma-workspace, qtx11extras, solid, udev }: -plasmaPackage { +mkDerivation { name = "powerdevil"; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kconfig kdbusaddons knotifyconfig solid udev bluez-qt kactivities kauth kdelibs4support kglobalaccel ki18n kio kidletime kwayland libkscreen networkmanager-qt plasma-workspace qtx11extras diff --git a/pkgs/desktops/plasma-5/startkde/default.nix b/pkgs/desktops/plasma-5/startkde/default.nix index 87c72fdc599..3b04c037073 100644 --- a/pkgs/desktops/plasma-5/startkde/default.nix +++ b/pkgs/desktops/plasma-5/startkde/default.nix @@ -1,54 +1,41 @@ { - stdenv, lib, runCommand, dbus, qttools, socat, gnugrep, gnused, kconfig, - kinit, kservice, plasma-workspace, xmessage, xprop, xsetroot, qtbase, - qtdeclarative, qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, - qtscript, qtsvg, qtx11extras, qtxmlpatterns + stdenv, lib, runCommand, substituteAll, dbus, gnugrep, gnused, kconfig, + kinit, kservice, plasma-desktop, plasma-workspace, xmessage, xprop, xrdb, + xsetroot, qttools, }: let - env = { + inherit (lib) getBin getLib; + + script = substituteAll { + src = ./startkde.sh; inherit (stdenv) shell; - bins = builtins.map (pkg: pkg.out or pkg) - [ - dbus qttools socat - gnugrep gnused - kconfig kinit kservice - plasma-workspace - xmessage xprop xsetroot - ]; - libs = builtins.map (pkg: pkg.out or pkg) - [ - qtbase qtdeclarative qtgraphicaleffects qtquickcontrols qtquickcontrols2 - qtscript qtsvg qtx11extras qtxmlpatterns - ]; + kbuildsycoca5 = "${getBin kservice}/bin/kbuildsycoca5"; + sed = "${getBin gnused}/bin/sed"; + kcheckrunning = "${getBin plasma-workspace}/bin/kcheckrunning"; + xmessage = "${getBin xmessage}/bin/xmessage"; + kstartupconfig5 = "${getBin plasma-workspace}/bin/kstartupconfig5"; + kapplymousetheme = "${getBin plasma-desktop}/bin/kapplymousetheme"; + xsetroot = "${getBin xsetroot}/bin/xsetroot"; + xrdb = "${getBin xrdb}/bin/xrdb"; + ksplashqml = "${getBin plasma-workspace}/bin/ksplashqml"; + qdbus = "${getBin qttools}/bin/qdbus"; + xprop = "${getBin xprop}/bin/xprop"; + qtpaths = "${getBin qttools}/bin/qtpaths"; + dbus_update_activation_environment = "${getBin dbus}/bin/dbus-update-activation-environment"; + start_kdeinit_wrapper = "${getLib kinit}/lib/libexec/kf5/start_kdeinit_wrapper"; + kwrapper5 = "${getBin kinit}/bin/kwrapper5"; + ksmserver = "${getBin plasma-workspace}/bin/ksmserver"; + kreadconfig5 = "${getBin kconfig}/bin/kreadconfig5"; + kdeinit5_shutdown = "${getBin kinit}/bin/kdeinit5_shutdown"; }; -in runCommand "startkde" env '' +in - # Configure PATH variable - suffixPATH= - for p in $bins; do - addToSearchPath suffixPATH "$p/bin" - addToSearchPath suffixPATH "$p/lib/libexec" - addToSearchPath suffixPATH "$p/lib/libexec/kf5" - done - - # Configure Qt search paths - QT_PLUGIN_PATH= - QML_IMPORT_PATH= - QML2_IMPORT_PATH= - for p in $libs; do - addToSearchPath QT_PLUGIN_PATH "$p/lib/qt5/plugins" - addToSearchPath QML_IMPORT_PATH "$p/lib/qt5/imports" - addToSearchPath QML2_IMPORT_PATH "$p/lib/qt5/qml" - done - - substitute ${./startkde.sh} "$out" \ - --subst-var shell \ - --subst-var suffixPATH \ - --subst-var QT_PLUGIN_PATH \ - --subst-var QML_IMPORT_PATH \ - --subst-var QML2_IMPORT_PATH - chmod +x "$out" +runCommand "startkde.sh" +{ preferLocalBuild = true; allowSubstitutes = false; } +'' + cp ${script} $out + chmod +x $out '' diff --git a/pkgs/desktops/plasma-5/startkde/startkde.sh b/pkgs/desktops/plasma-5/startkde/startkde.sh index c38450516e9..f8b4f4844e2 100755 --- a/pkgs/desktops/plasma-5/startkde/startkde.sh +++ b/pkgs/desktops/plasma-5/startkde/startkde.sh @@ -1,12 +1,6 @@ #!@shell@ -PATH="$PATH${PATH:+:}@suffixPATH@" - -export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}@QT_PLUGIN_PATH@" -export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}@QML_IMPORT_PATH@" -export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}@QML2_IMPORT_PATH@" - -kbuildsycoca5 +@kbuildsycoca5@ # Set the default GTK 2 theme if ! [ -e $HOME/.gtkrc-2.0 ] \ @@ -32,6 +26,7 @@ fi if ! [ -e $HOME/.config/gtk-3.0/settings.ini ] \ && [ -e /run/current-system/sw/share/themes/Breeze/gtk-3.0 ]; then + mkdir -p $HOME/.config/gtk-3.0 cat >$HOME/.config/gtk-3.0/settings.ini <&2 # Make sure that D-Bus is running -if qdbus >/dev/null 2>/dev/null; then +if @qdbus@ >/dev/null 2>/dev/null; then : # ok else echo 'startkde: Could not start D-Bus. Can you call qdbus?' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null - xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?" + @xmessage@ -geometry 500x100 "Could not start D-Bus. Can you call qdbus?" exit 1 fi @@ -274,11 +269,11 @@ fi # KDE_FULL_SESSION=true export KDE_FULL_SESSION -xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true +@xprop@ -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true KDE_SESSION_VERSION=5 export KDE_SESSION_VERSION -xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5 +@xprop@ -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 5 KDE_SESSION_UID=$(id -ru) export KDE_SESSION_UID @@ -300,7 +295,7 @@ export XDG_CURRENT_DESKTOP # For anything else (that doesn't set env vars, or that needs a window manager), # better use the Autostart folder. -IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation) +IFS=":" read -r -a scriptpath <<< $(@qtpaths@ --paths GenericConfigLocation) # Add /env/ to the directory to locate the scripts to be sourced for prefix in "${scriptpath[@]}"; do for file in "$prefix"/plasma-workspace/env/*.sh; do @@ -308,37 +303,28 @@ for prefix in "${scriptpath[@]}"; do done done -# At this point all the environment is ready, let's send it to kwalletd if running -if test -n "$PAM_KWALLET_LOGIN" ; then - env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN -fi -# ...and also to kwalletd5 -if test -n "$PAM_KWALLET5_LOGIN" ; then - env | socat STDIN UNIX-CONNECT:$PAM_KWALLET5_LOGIN -fi - # At this point all environment variables are set, let's send it to the DBus session server to update the activation environment -dbus-update-activation-environment --systemd --all +@dbus_update_activation_environment@ --systemd --all if test $? -ne 0; then # Startup error echo 'startkde: Could not sync environment to dbus.' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null - xmessage -geometry 500x100 "Could not sync environment to dbus." + @xmessage@ -geometry 500x100 "Could not sync environment to dbus." exit 1 fi # We set LD_BIND_NOW to increase the efficiency of kdeinit. # kdeinit unsets this variable before loading applications. -LD_BIND_NOW=true start_kdeinit_wrapper --kded +kcminit_startup +LD_BIND_NOW=true @start_kdeinit_wrapper@ --kded +kcminit_startup if test $? -ne 0; then # Startup error echo 'startkde: Could not start kdeinit5. Check your installation.' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null - xmessage -geometry 500x100 "Could not start kdeinit5. Check your installation." + @xmessage@ -geometry 500x100 "Could not start kdeinit5. Check your installation." exit 1 fi -qdbus org.kde.KSplash /KSplash org.kde.KSplash.setStage kinit +@qdbus@ org.kde.KSplash /KSplash org.kde.KSplash.setStage kinit # finally, give the session control to the session manager # see kdebase/ksmserver for the description of the rest of the startup sequence @@ -355,15 +341,15 @@ test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" # lock now and do the rest of the KDE startup underneath the locker. KSMSERVEROPTIONS="" test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen" -kwrapper5 ksmserver $KDEWM $KSMSERVEROPTIONS +@kwrapper5@ @ksmserver@ $KDEWM $KSMSERVEROPTIONS if test $? -eq 255; then # Startup error echo 'startkde: Could not start ksmserver. Check your installation.' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null - xmessage -geometry 500x100 "Could not start ksmserver. Check your installation." + @xmessage@ -geometry 500x100 "Could not start ksmserver. Check your installation." fi -wait_drkonqi=$(kreadconfig5 --file startkderc --group WaitForDrKonqi --key Enabled --default true) +wait_drkonqi=$(@kreadconfig5@ --file startkderc --group WaitForDrKonqi --key Enabled --default true) if test x"$wait_drkonqi"x = x"true"x ; then # wait for remaining drkonqi instances with timeout (in seconds) @@ -374,8 +360,8 @@ if test x"$wait_drkonqi"x = x"true"x ; then wait_drkonqi_counter=$((wait_drkonqi_counter+5)) if test "$wait_drkonqi_counter" -ge "$wait_drkonqi_timeout" ; then # ask remaining drkonqis to die in a graceful way - qdbus | grep 'org.kde.drkonqi-' | while read address ; do - qdbus "$address" "/MainApplication" "quit" + @qdbus@ | grep 'org.kde.drkonqi-' | while read address ; do + @qdbus@ "$address" "/MainApplication" "quit" done break fi @@ -387,12 +373,12 @@ echo 'startkde: Shutting down...' 1>&2 test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null # Clean up -kdeinit5_shutdown +@kdeinit5_shutdown@ unset KDE_FULL_SESSION -xprop -root -remove KDE_FULL_SESSION +@xprop@ -root -remove KDE_FULL_SESSION unset KDE_SESSION_VERSION -xprop -root -remove KDE_SESSION_VERSION +@xprop@ -root -remove KDE_SESSION_VERSION unset KDE_SESSION_UID echo 'startkde: Done.' 1>&2 diff --git a/pkgs/desktops/plasma-5/systemsettings.nix b/pkgs/desktops/plasma-5/systemsettings.nix index 4146e34c2f7..a24eabc39f3 100644 --- a/pkgs/desktops/plasma-5/systemsettings.nix +++ b/pkgs/desktops/plasma-5/systemsettings.nix @@ -1,14 +1,15 @@ { - plasmaPackage, extra-cmake-modules, kdoctools, makeQtWrapper, + mkDerivation, extra-cmake-modules, kdoctools, kcmutils, kconfig, kdbusaddons, khtml, ki18n, kiconthemes, kio, kitemviews, kservice, kwindowsystem, kxmlgui, qtquickcontrols, qtquickcontrols2 }: -plasmaPackage { +mkDerivation { name = "systemsettings"; - nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ kcmutils kconfig kdbusaddons khtml ki18n kiconthemes kio kitemviews kservice kwindowsystem kxmlgui qtquickcontrols qtquickcontrols2 ]; + outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/accounts-qt/default.nix b/pkgs/development/libraries/accounts-qt/default.nix index a6d9a9381f9..883d0d65aa5 100644 --- a/pkgs/development/libraries/accounts-qt/default.nix +++ b/pkgs/development/libraries/accounts-qt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase, qmakeHook }: +{ stdenv, fetchFromGitLab, doxygen, glib, libaccounts-glib, pkgconfig, qtbase, qmake }: stdenv.mkDerivation rec { name = "accounts-qt-${version}"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ glib libaccounts-glib qtbase ]; - nativeBuildInputs = [ doxygen pkgconfig qmakeHook ]; + nativeBuildInputs = [ doxygen pkgconfig qmake ]; preConfigure = '' qmakeFlags="$qmakeFlags LIBDIR=$out/lib CMAKE_CONFIG_PATH=$out/lib/cmake" diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 5601a8854ef..8ae88944dd1 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan }: +{ stdenv, fetchurl, fetchpatch, libgpgerror, gnupg, pkgconfig, glib, pth, libassuan +, qtbase ? null }: + +let inherit (stdenv) lib system; in stdenv.mkDerivation rec { name = "gpgme-1.9.0"; @@ -8,10 +11,20 @@ stdenv.mkDerivation rec { sha256 = "1ssc0gs02r4fasabk7c6v6r865k2j02mpb5g1vkpbmzsigdzwa8v"; }; + patches = [ + (fetchpatch { + url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff_plain;h=5d4f977dac542340c877fdd4b1304fa8f6e058e6"; + sha256 = "0swpxzd3x3b6h2ry2py9j8l0xp3vdw8rixxhgfavzia5p869qyyx"; + name = "qgpgme-format-security.patch"; + }) + ]; + outputs = [ "out" "dev" "info" ]; outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool - propagatedBuildInputs = [ libgpgerror glib libassuan pth ]; + propagatedBuildInputs = + [ libgpgerror glib libassuan pth ] + ++ lib.optional (qtbase != null) qtbase; nativeBuildInputs = [ pkgconfig gnupg ]; @@ -21,7 +34,7 @@ stdenv.mkDerivation rec { # https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html NIX_CFLAGS_COMPILE = - with stdenv; lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; + lib.optional (system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; meta = with stdenv.lib; { homepage = "https://gnupg.org/software/gpgme/index.html"; diff --git a/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch b/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch new file mode 100644 index 00000000000..4abc2757cf6 --- /dev/null +++ b/pkgs/development/libraries/gpgme/gpgme_libsuffix.patch @@ -0,0 +1,12 @@ +diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in +index 928d19f..cbe9713 100644 (file) +--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in ++++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in +@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED) + + set_target_properties(Gpgmepp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@" +- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@" ++ INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@" + IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so" + ) diff --git a/pkgs/development/libraries/kde-frameworks/attica.nix b/pkgs/development/libraries/kde-frameworks/attica.nix index 6c120c20d3a..3c725223979 100644 --- a/pkgs/development/libraries/kde-frameworks/attica.nix +++ b/pkgs/development/libraries/kde-frameworks/attica.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase }: +{ mkDerivation, lib, extra-cmake-modules, qtbase }: -kdeFramework { +mkDerivation { name = "attica"; meta = { maintainers = [ lib.maintainers.ttuegel ]; @@ -8,4 +8,5 @@ kdeFramework { }; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/baloo.nix b/pkgs/development/libraries/kde-frameworks/baloo.nix index dc7b6af193b..d5da9f5af17 100644 --- a/pkgs/development/libraries/kde-frameworks/baloo.nix +++ b/pkgs/development/libraries/kde-frameworks/baloo.nix @@ -1,14 +1,17 @@ -{ kdeFramework, lib, extra-cmake-modules, kauth, kconfig -, kcoreaddons, kcrash, kdbusaddons, kfilemetadata, ki18n, kidletime -, kio, lmdb, qtbase, solid +{ + mkDerivation, lib, + extra-cmake-modules, + kauth, kconfig, kcoreaddons, kcrash, kdbusaddons, kfilemetadata, ki18n, + kidletime, kio, lmdb, qtbase, qtdeclarative, solid, }: -kdeFramework { +mkDerivation { name = "baloo"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kauth kconfig kcoreaddons kcrash kdbusaddons kfilemetadata ki18n kio - kidletime lmdb qtbase solid + buildInputs = [ + kauth kconfig kcrash kdbusaddons ki18n kio kidletime lmdb qtdeclarative + solid ]; + propagatedBuildInputs = [ kcoreaddons kfilemetadata qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/bluez-qt.nix b/pkgs/development/libraries/kde-frameworks/bluez-qt.nix index 261d9471a77..ec4deae6cb4 100644 --- a/pkgs/development/libraries/kde-frameworks/bluez-qt.nix +++ b/pkgs/development/libraries/kde-frameworks/bluez-qt.nix @@ -1,18 +1,19 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules , qtbase, qtdeclarative }: -kdeFramework { +mkDerivation { name = "bluez-qt"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ qtdeclarative ]; + buildInputs = [ qtdeclarative ]; + propagatedBuildInputs = [ qtbase ]; preConfigure = '' substituteInPlace CMakeLists.txt \ - --replace /lib/udev/rules.d "$out/lib/udev/rules.d" + --replace /lib/udev/rules.d "$bin/lib/udev/rules.d" ''; } diff --git a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix index 9a18ade96a8..9e4a40b22ab 100644 --- a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix +++ b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix @@ -1,10 +1,9 @@ -{ kdeFramework, lib, extra-cmake-modules, qtsvg }: +{ mkDerivation, lib, extra-cmake-modules, qtsvg }: -kdeFramework { +mkDerivation { name = "breeze-icons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - outputs = [ "out" ]; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ qtsvg ]; - propagatedUserEnvPkgs = [ qtsvg.out ]; + outputs = [ "out" ]; # only runtime outputs } diff --git a/pkgs/development/libraries/kde-frameworks/build-support/framework.nix b/pkgs/development/libraries/kde-frameworks/build-support/framework.nix deleted file mode 100644 index 5b6f2cc4b26..00000000000 --- a/pkgs/development/libraries/kde-frameworks/build-support/framework.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ kdeDerivation, lib, fetchurl }: - -let - mirror = "mirror://kde"; - srcs = import ../srcs.nix { inherit fetchurl mirror; }; -in - -args: - -let - inherit (args) name; - inherit (srcs."${name}") src version; -in kdeDerivation (args // { - name = "${name}-${version}"; - inherit src; - - meta = { - license = with lib.licenses; [ - lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12 - ]; - platforms = lib.platforms.linux; - homepage = "http://www.kde.org"; - } // (args.meta or {}); -}) diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index 221fba628ba..8ab1d1b99b6 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -24,89 +24,159 @@ existing packages here and modify it as necessary. */ -{ libsForQt5, kdeDerivation, lib, fetchurl }: +{ libsForQt5, lib, fetchurl }: let + + srcs = import ./srcs.nix { + inherit fetchurl; + mirror = "mirror://kde"; + }; + + mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; + packages = self: with self; + # SUPPORT let + + propagate = out: + let setupHook = { writeScript }: + writeScript "setup-hook.sh" '' + # Propagate $${out} output + propagatedUserEnvPkgs+=" @${out}@" + + # Propagate $dev so that this setup hook is propagated + # But only if there is a separate $dev output + if [ "$outputDev" != out ]; then + if [ -n "$crossConfig" ]; then + propagatedBuildInputs+=" @dev@" + else + propagatedNativeBuildInputs+=" @dev@" + fi + fi + ''; + in callPackage setupHook {}; + + propagateBin = propagate "bin"; + callPackage = self.newScope { - kdeFramework = import ./build-support/framework.nix { - inherit kdeDerivation lib fetchurl; - }; + + inherit propagate propagateBin; + + mkDerivation = args: + let + + inherit (args) name; + inherit (srcs."${name}") src version; + + outputs = args.outputs or [ "out" "dev" "bin" ]; + hasBin = lib.elem "bin" outputs; + hasDev = lib.elem "dev" outputs; + + defaultSetupHook = if hasBin && hasDev then propagateBin else null; + setupHook = args.setupHook or defaultSetupHook; + + meta = { + homepage = "http://www.kde.org"; + license = with lib.licenses; [ + lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12 + ]; + maintainers = [ lib.maintainers.ttuegel ]; + platforms = lib.platforms.linux; + } // (args.meta or {}); + + in mkDerivation (args // { + name = "${name}-${version}"; + inherit meta outputs setupHook src; + }); + }; + in { + extra-cmake-modules = callPackage ./extra-cmake-modules {}; + + # TIER 1 attica = callPackage ./attica.nix {}; - baloo = callPackage ./baloo.nix {}; bluez-qt = callPackage ./bluez-qt.nix {}; breeze-icons = callPackage ./breeze-icons.nix {}; - extra-cmake-modules = callPackage ./extra-cmake-modules {}; - frameworkintegration = callPackage ./frameworkintegration.nix {}; - kactivities = callPackage ./kactivities.nix {}; - kactivities-stats = callPackage ./kactivities-stats.nix {}; kapidox = callPackage ./kapidox.nix {}; karchive = callPackage ./karchive.nix {}; - kauth = callPackage ./kauth {}; - kbookmarks = callPackage ./kbookmarks.nix {}; - kcmutils = callPackage ./kcmutils {}; kcodecs = callPackage ./kcodecs.nix {}; - kcompletion = callPackage ./kcompletion.nix {}; kconfig = callPackage ./kconfig.nix {}; - kconfigwidgets = callPackage ./kconfigwidgets {}; kcoreaddons = callPackage ./kcoreaddons.nix {}; - kcrash = callPackage ./kcrash.nix {}; kdbusaddons = callPackage ./kdbusaddons.nix {}; - kdeclarative = callPackage ./kdeclarative.nix {}; - kded = callPackage ./kded.nix {}; - kdelibs4support = callPackage ./kdelibs4support {}; - kdesignerplugin = callPackage ./kdesignerplugin.nix {}; - kdesu = callPackage ./kdesu.nix {}; kdnssd = callPackage ./kdnssd.nix {}; - kdoctools = callPackage ./kdoctools {}; - kemoticons = callPackage ./kemoticons.nix {}; - kfilemetadata = callPackage ./kfilemetadata {}; - kglobalaccel = callPackage ./kglobalaccel.nix {}; kguiaddons = callPackage ./kguiaddons.nix {}; - khtml = callPackage ./khtml.nix {}; ki18n = callPackage ./ki18n.nix {}; - kiconthemes = callPackage ./kiconthemes {}; kidletime = callPackage ./kidletime.nix {}; - kimageformats = callPackage ./kimageformats.nix {}; - kinit = callPackage ./kinit {}; - kio = callPackage ./kio {}; kitemmodels = callPackage ./kitemmodels.nix {}; kitemviews = callPackage ./kitemviews.nix {}; - kjobwidgets = callPackage ./kjobwidgets.nix {}; - kjs = callPackage ./kjs.nix {}; - kjsembed = callPackage ./kjsembed.nix {}; - kmediaplayer = callPackage ./kmediaplayer.nix {}; - knewstuff = callPackage ./knewstuff.nix {}; - knotifications = callPackage ./knotifications.nix {}; - knotifyconfig = callPackage ./knotifyconfig.nix {}; - kpackage = callPackage ./kpackage {}; - kparts = callPackage ./kparts.nix {}; - kpeople = callPackage ./kpeople.nix {}; kplotting = callPackage ./kplotting.nix {}; - kpty = callPackage ./kpty.nix {}; - kross = callPackage ./kross.nix {}; - krunner = callPackage ./krunner.nix {}; - kservice = callPackage ./kservice {}; - ktexteditor = callPackage ./ktexteditor.nix {}; - ktextwidgets = callPackage ./ktextwidgets.nix {}; - kunitconversion = callPackage ./kunitconversion.nix {}; - kwallet = callPackage ./kwallet.nix {}; kwayland = callPackage ./kwayland.nix {}; kwidgetsaddons = callPackage ./kwidgetsaddons.nix {}; kwindowsystem = callPackage ./kwindowsystem {}; - kxmlgui = callPackage ./kxmlgui.nix {}; - kxmlrpcclient = callPackage ./kxmlrpcclient.nix {}; modemmanager-qt = callPackage ./modemmanager-qt.nix {}; networkmanager-qt = callPackage ./networkmanager-qt.nix {}; oxygen-icons5 = callPackage ./oxygen-icons5.nix {}; - plasma-framework = callPackage ./plasma-framework.nix {}; + prison = callPackage ./prison.nix {}; solid = callPackage ./solid.nix {}; sonnet = callPackage ./sonnet.nix {}; syntax-highlighting = callPackage ./syntax-highlighting.nix {}; threadweaver = callPackage ./threadweaver.nix {}; + + # TIER 2 + kactivities = callPackage ./kactivities.nix {}; + kactivities-stats = callPackage ./kactivities-stats.nix {}; + kauth = callPackage ./kauth {}; + kcompletion = callPackage ./kcompletion.nix {}; + kcrash = callPackage ./kcrash.nix {}; + kdoctools = callPackage ./kdoctools {}; + kfilemetadata = callPackage ./kfilemetadata {}; + kimageformats = callPackage ./kimageformats.nix {}; + kjobwidgets = callPackage ./kjobwidgets.nix {}; + knotifications = callPackage ./knotifications.nix {}; + kpackage = callPackage ./kpackage {}; + kpty = callPackage ./kpty.nix {}; + kunitconversion = callPackage ./kunitconversion.nix {}; + + # TIER 3 + baloo = callPackage ./baloo.nix {}; + kbookmarks = callPackage ./kbookmarks.nix {}; + kcmutils = callPackage ./kcmutils {}; + kconfigwidgets = callPackage ./kconfigwidgets {}; + kdeclarative = callPackage ./kdeclarative.nix {}; + kded = callPackage ./kded.nix {}; + kdesignerplugin = callPackage ./kdesignerplugin.nix {}; + kdesu = callPackage ./kdesu.nix {}; + kemoticons = callPackage ./kemoticons.nix {}; + kglobalaccel = callPackage ./kglobalaccel.nix {}; + kiconthemes = callPackage ./kiconthemes {}; + kinit = callPackage ./kinit {}; + kio = callPackage ./kio {}; + knewstuff = callPackage ./knewstuff.nix {}; + knotifyconfig = callPackage ./knotifyconfig.nix {}; + kparts = callPackage ./kparts.nix {}; + kpeople = callPackage ./kpeople.nix {}; + krunner = callPackage ./krunner.nix {}; + kservice = callPackage ./kservice {}; + ktexteditor = callPackage ./ktexteditor.nix {}; + ktextwidgets = callPackage ./ktextwidgets.nix {}; + kwallet = callPackage ./kwallet.nix {}; + kxmlgui = callPackage ./kxmlgui.nix {}; + kxmlrpcclient = callPackage ./kxmlrpcclient.nix {}; + plasma-framework = callPackage ./plasma-framework.nix {}; + + # TIER 4 + frameworkintegration = callPackage ./frameworkintegration.nix {}; + + # PORTING AIDS + kdelibs4support = callPackage ./kdelibs4support {}; + khtml = callPackage ./khtml.nix {}; + kjs = callPackage ./kjs.nix {}; + kjsembed = callPackage ./kjsembed.nix {}; + kmediaplayer = callPackage ./kmediaplayer.nix {}; + kross = callPackage ./kross.nix {}; + }; in lib.makeScope libsForQt5.newScope packages diff --git a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix index f8a774b6855..dfdb6a11803 100644 --- a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix +++ b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, copyPathsToStore, cmake, pkgconfig }: +{ mkDerivation, lib, copyPathsToStore, cmake, pkgconfig }: -kdeFramework { +mkDerivation { name = "extra-cmake-modules"; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); diff --git a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh index 9ee9ef90a44..c1b1e21852c 100644 --- a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh +++ b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh @@ -1,22 +1,17 @@ -_ecmSetXdgDirs() { +_ecmEnvHook() { addToSearchPath XDG_DATA_DIRS "$1/share" addToSearchPath XDG_CONFIG_DIRS "$1/etc/xdg" } +envHooks+=(_ecmEnvHook) -envHooks+=(_ecmSetXdgDirs) - -_ecmConfig() { +_ecmPreConfigureHook() { # Because we need to use absolute paths here, we must set *all* the paths. cmakeFlags+=" -DKDE_INSTALL_EXECROOTDIR=${!outputBin}" cmakeFlags+=" -DKDE_INSTALL_BINDIR=${!outputBin}/bin" cmakeFlags+=" -DKDE_INSTALL_SBINDIR=${!outputBin}/sbin" cmakeFlags+=" -DKDE_INSTALL_LIBDIR=${!outputLib}/lib" - cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputBin}/lib/libexec" + cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/lib/libexec" cmakeFlags+=" -DKDE_INSTALL_CMAKEPACKAGEDIR=${!outputDev}/lib/cmake" - cmakeFlags+=" -DKDE_INSTALL_QTPLUGINDIR=${!outputBin}/lib/qt5/plugins" - cmakeFlags+=" -DKDE_INSTALL_PLUGINDIR=${!outputBin}/lib/qt5/plugins" - cmakeFlags+=" -DKDE_INSTALL_QTQUICKIMPORTSDIR=${!outputBin}/lib/qt5/imports" - cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputBin}/lib/qt5/qml" cmakeFlags+=" -DKDE_INSTALL_INCLUDEDIR=${!outputInclude}/include" cmakeFlags+=" -DKDE_INSTALL_LOCALSTATEDIR=/var" cmakeFlags+=" -DKDE_INSTALL_DATAROOTDIR=${!outputBin}/share" @@ -29,7 +24,7 @@ _ecmConfig() { cmakeFlags+=" -DKDE_INSTALL_KXMLGUI5DIR=${!outputBin}/share/kxmlgui5" cmakeFlags+=" -DKDE_INSTALL_KNOTIFY5RCDIR=${!outputBin}/share/knotifications5" cmakeFlags+=" -DKDE_INSTALL_ICONDIR=${!outputBin}/share/icons" - cmakeFlags+=" -DKDE_INSTALL_LOCALEDIR=${!outputBin}/share/locale" + cmakeFlags+=" -DKDE_INSTALL_LOCALEDIR=${!outputLib}/share/locale" cmakeFlags+=" -DKDE_INSTALL_SOUNDDIR=${!outputBin}/share/sounds" cmakeFlags+=" -DKDE_INSTALL_TEMPLATEDIR=${!outputBin}/share/templates" cmakeFlags+=" -DKDE_INSTALL_WALLPAPERDIR=${!outputBin}/share/wallpapers" @@ -46,6 +41,14 @@ _ecmConfig() { cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputBin}/etc" cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputBin}/etc/xdg" cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputBin}/etc/xdg/autostart" -} -preConfigureHooks+=(_ecmConfig) + if [ -n "$qtPluginPrefix" ]; then + cmakeFlags+=" -DKDE_INSTALL_QTPLUGINDIR=${!outputBin}/$qtPluginPrefix" + cmakeFlags+=" -DKDE_INSTALL_PLUGINDIR=${!outputBin}/$qtPluginPrefix" + fi + + if [ -n "$qtQmlPrefix" ]; then + cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputBin}/$qtQmlPrefix" + fi +} +preConfigureHooks+=(_ecmPreConfigureHook) diff --git a/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix b/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix index 325758bf91d..58b064806e5 100644 --- a/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix +++ b/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix @@ -1,16 +1,17 @@ { - kdeFramework, lib, + mkDerivation, lib, extra-cmake-modules, kbookmarks, kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kio, knewstuff, knotifications, kpackage, kwidgetsaddons, libXcursor, qtx11extras }: -kdeFramework { +mkDerivation { name = "frameworkintegration"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kbookmarks kcompletion kconfig kconfigwidgets ki18n kio kiconthemes - knewstuff knotifications kpackage kwidgetsaddons libXcursor qtx11extras + buildInputs = [ + kbookmarks kcompletion kconfig ki18n kio knewstuff knotifications kpackage + kwidgetsaddons libXcursor qtx11extras ]; + propagatedBuildInputs = [ kconfigwidgets kiconthemes ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix b/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix index 25188b009b6..b558306248a 100644 --- a/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix +++ b/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix @@ -1,8 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, boost, kactivities, kconfig }: +{ + mkDerivation, lib, + extra-cmake-modules, + boost, kactivities, kconfig, qtbase, +}: -kdeFramework { +mkDerivation { name = "kactivities-stats"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ boost kactivities kconfig ]; + buildInputs = [ boost kactivities kconfig ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kactivities.nix b/pkgs/development/libraries/kde-frameworks/kactivities.nix index 167c3f15bbd..eabac6aadd7 100644 --- a/pkgs/development/libraries/kde-frameworks/kactivities.nix +++ b/pkgs/development/libraries/kde-frameworks/kactivities.nix @@ -1,14 +1,15 @@ -{ kdeFramework, lib, extra-cmake-modules, boost, kcmutils, kconfig -, kcoreaddons, kdbusaddons, kdeclarative, kglobalaccel, ki18n -, kio, kservice, kwindowsystem, kxmlgui, qtdeclarative +{ + mkDerivation, lib, + extra-cmake-modules, + boost, kconfig, kcoreaddons, kio, kwindowsystem, qtbase, qtdeclarative, }: -kdeFramework { +mkDerivation { name = "kactivities"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - boost kcmutils kconfig kcoreaddons kdbusaddons kdeclarative kglobalaccel - ki18n kio kservice kwindowsystem kxmlgui qtdeclarative + buildInputs = [ + boost kconfig kcoreaddons kio kwindowsystem qtdeclarative ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kapidox.nix b/pkgs/development/libraries/kde-frameworks/kapidox.nix index 749cf9b2970..ca5e773a45b 100644 --- a/pkgs/development/libraries/kde-frameworks/kapidox.nix +++ b/pkgs/development/libraries/kde-frameworks/kapidox.nix @@ -1,7 +1,10 @@ -{ kdeFramework, lib, extra-cmake-modules, python }: +{ mkDerivation, lib, extra-cmake-modules, python }: -kdeFramework { +mkDerivation { name = "kapidox"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules python ]; + postFixup = '' + moveToOutput bin $bin + ''; } diff --git a/pkgs/development/libraries/kde-frameworks/karchive.nix b/pkgs/development/libraries/kde-frameworks/karchive.nix index 71561b1109c..1f90db2bc02 100644 --- a/pkgs/development/libraries/kde-frameworks/karchive.nix +++ b/pkgs/development/libraries/kde-frameworks/karchive.nix @@ -1,11 +1,17 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase }: +{ + mkDerivation, lib, + extra-cmake-modules, + bzip2, lzma, qtbase, zlib, +}: -kdeFramework { +mkDerivation { name = "karchive"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; + buildInputs = [ bzip2 lzma zlib ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kauth/default.nix b/pkgs/development/libraries/kde-frameworks/kauth/default.nix index 7561575ae84..c94c8b91ecd 100644 --- a/pkgs/development/libraries/kde-frameworks/kauth/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kauth/default.nix @@ -1,9 +1,17 @@ -{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kcoreaddons, polkit-qt, qttools }: +{ + mkDerivation, lib, copyPathsToStore, propagate, + extra-cmake-modules, kcoreaddons, polkit-qt, qttools +}: -kdeFramework { +mkDerivation { name = "kauth"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ kcoreaddons polkit-qt ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ polkit-qt qttools ]; + propagatedBuildInputs = [ kcoreaddons ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + # library stores reference to plugin path, + # separating $out from $bin would create a reference cycle + outputs = [ "out" "dev" ]; + setupHook = propagate "out"; } diff --git a/pkgs/development/libraries/kde-frameworks/kbookmarks.nix b/pkgs/development/libraries/kde-frameworks/kbookmarks.nix index 36ea7405842..dc2339632e4 100644 --- a/pkgs/development/libraries/kde-frameworks/kbookmarks.nix +++ b/pkgs/development/libraries/kde-frameworks/kbookmarks.nix @@ -1,13 +1,17 @@ { - kdeFramework, lib, extra-cmake-modules, - kcodecs, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kxmlgui + mkDerivation, lib, + extra-cmake-modules, qttools, + kcodecs, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kwidgetsaddons, + kxmlgui, qtbase, }: -kdeFramework { +mkDerivation { name = "kbookmarks"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ extra-cmake-modules qttools ]; + buildInputs = [ kcodecs kconfig kconfigwidgets kcoreaddons kiconthemes kxmlgui ]; + propagatedBuildInputs = [ kwidgetsaddons qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kcmutils/default.nix b/pkgs/development/libraries/kde-frameworks/kcmutils/default.nix index fdf55174548..0c661dcdd48 100644 --- a/pkgs/development/libraries/kde-frameworks/kcmutils/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kcmutils/default.nix @@ -1,15 +1,18 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfigwidgets -, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews -, kpackage, kservice, kxmlgui +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, + kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews, + kpackage, kservice, kxmlgui, qtdeclarative, }: -kdeFramework { +mkDerivation { name = "kcmutils"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kconfigwidgets kcoreaddons kdeclarative ki18n kiconthemes kitemviews - kpackage kservice kxmlgui + buildInputs = [ + kcoreaddons kdeclarative ki18n kiconthemes kitemviews kpackage kxmlgui + qtdeclarative ]; - patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; + propagatedBuildInputs = [ kconfigwidgets kservice ]; + patches = (copyPathsToStore (lib.readPathsFromFile ./. ./series)); } diff --git a/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-debug-module-loader.patch b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-debug-module-loader.patch new file mode 100644 index 00000000000..0411755f45a --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-debug-module-loader.patch @@ -0,0 +1,13 @@ +Index: kcmutils-5.33.0/src/kcmoduleloader.cpp +=================================================================== +--- kcmutils-5.33.0.orig/src/kcmoduleloader.cpp ++++ kcmutils-5.33.0/src/kcmoduleloader.cpp +@@ -96,7 +96,7 @@ KCModule *KCModuleLoader::loadModule(con + KPluginLoader loader(KPluginLoader::findPlugin(QLatin1String("kcms/") + mod.service()->library())); + KPluginFactory* factory = loader.factory(); + if (!factory) { +- qWarning() << "Error loading plugin:" << loader.errorString(); ++ qWarning() << "Error loading KCM plugin" << mod.service()->library() << loader.errorString(); + } else { + KQuickAddons::ConfigModule *cm = factory->create(); + if (!cm) { diff --git a/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-fix-plugin-path.patch b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-fix-plugin-path.patch new file mode 100644 index 00000000000..e82ce7d592c --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-fix-plugin-path.patch @@ -0,0 +1,13 @@ +Index: kcmutils-5.33.0/src/kcmoduleloader.cpp +=================================================================== +--- kcmutils-5.33.0.orig/src/kcmoduleloader.cpp ++++ kcmutils-5.33.0/src/kcmoduleloader.cpp +@@ -93,7 +93,7 @@ KCModule *KCModuleLoader::loadModule(con + if (module) { + return module; + } else { +- KPluginLoader loader(KPluginLoader::findPlugin(QLatin1String("kcms/") + mod.service()->library())); ++ KPluginLoader loader(KPluginLoader::findPlugin(mod.service()->library())); + KPluginFactory* factory = loader.factory(); + if (!factory) { + qWarning() << "Error loading KCM plugin" << mod.service()->library() << loader.errorString(); diff --git a/pkgs/development/libraries/kde-frameworks/kcmutils/0001-qdiriterator-follow-symlinks.patch b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-follow-symlinks.patch similarity index 54% rename from pkgs/development/libraries/kde-frameworks/kcmutils/0001-qdiriterator-follow-symlinks.patch rename to pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-follow-symlinks.patch index 0d861fa9501..5e1007b7fc0 100644 --- a/pkgs/development/libraries/kde-frameworks/kcmutils/0001-qdiriterator-follow-symlinks.patch +++ b/pkgs/development/libraries/kde-frameworks/kcmutils/kcmutils-follow-symlinks.patch @@ -1,17 +1,8 @@ -From f14d2a275323a47104b33eb61c5b6910ae1a9f59 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Wed, 14 Oct 2015 06:43:53 -0500 -Subject: [PATCH] qdiriterator follow symlinks - ---- - src/kpluginselector.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/kpluginselector.cpp b/src/kpluginselector.cpp -index 9c3431d..d6b1ee2 100644 ---- a/src/kpluginselector.cpp -+++ b/src/kpluginselector.cpp -@@ -305,7 +305,7 @@ void KPluginSelector::addPlugins(const QString &componentName, +Index: kcmutils-5.33.0/src/kpluginselector.cpp +=================================================================== +--- kcmutils-5.33.0.orig/src/kpluginselector.cpp ++++ kcmutils-5.33.0/src/kpluginselector.cpp +@@ -305,7 +305,7 @@ void KPluginSelector::addPlugins(const Q QStringList desktopFileNames; const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, componentName + QStringLiteral("/kpartplugins"), QStandardPaths::LocateDirectory); Q_FOREACH (const QString &dir, dirs) { @@ -20,6 +11,3 @@ index 9c3431d..d6b1ee2 100644 while (it.hasNext()) { desktopFileNames.append(it.next()); } --- -2.5.2 - diff --git a/pkgs/development/libraries/kde-frameworks/kcmutils/series b/pkgs/development/libraries/kde-frameworks/kcmutils/series new file mode 100644 index 00000000000..6fbc4ca6563 --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kcmutils/series @@ -0,0 +1,3 @@ +kcmutils-follow-symlinks.patch +kcmutils-debug-module-loader.patch +kcmutils-fix-plugin-path.patch diff --git a/pkgs/development/libraries/kde-frameworks/kcodecs.nix b/pkgs/development/libraries/kde-frameworks/kcodecs.nix index fa1679519cc..90c9a963a60 100644 --- a/pkgs/development/libraries/kde-frameworks/kcodecs.nix +++ b/pkgs/development/libraries/kde-frameworks/kcodecs.nix @@ -1,11 +1,13 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase, qttools }: +{ mkDerivation, lib, extra-cmake-modules, qtbase, qttools }: -kdeFramework { +mkDerivation { name = "kcodecs"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kcompletion.nix b/pkgs/development/libraries/kde-frameworks/kcompletion.nix index f143524889a..fdfe28db6c0 100644 --- a/pkgs/development/libraries/kde-frameworks/kcompletion.nix +++ b/pkgs/development/libraries/kde-frameworks/kcompletion.nix @@ -1,9 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfig, kwidgetsaddons, qtbase, qttools }: +{ + mkDerivation, lib, + extra-cmake-modules, + kconfig, kwidgetsaddons, qtbase, qttools +}: -kdeFramework { +mkDerivation { name = "kcompletion"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; - propagatedBuildInputs = [ kconfig kwidgetsaddons ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ kconfig kwidgetsaddons qttools ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kconfig.nix b/pkgs/development/libraries/kde-frameworks/kconfig.nix index f6d38cd2336..78b554017ee 100644 --- a/pkgs/development/libraries/kde-frameworks/kconfig.nix +++ b/pkgs/development/libraries/kde-frameworks/kconfig.nix @@ -1,11 +1,12 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase, qttools }: +{ mkDerivation, lib, extra-cmake-modules, qtbase, qttools }: -kdeFramework { +mkDerivation { name = "kconfig"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kconfigwidgets/default.nix b/pkgs/development/libraries/kde-frameworks/kconfigwidgets/default.nix index c44473bb915..3943e5d6d49 100644 --- a/pkgs/development/libraries/kde-frameworks/kconfigwidgets/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kconfigwidgets/default.nix @@ -1,17 +1,20 @@ { - kdeFramework, lib, extra-cmake-modules, - kauth, kcodecs, kconfig, kdoctools, kguiaddons, ki18n, kwidgetsaddons + mkDerivation, lib, extra-cmake-modules, + kauth, kcodecs, kconfig, kdoctools, kguiaddons, ki18n, kwidgetsaddons, qtbase, }: -kdeFramework { +mkDerivation { name = "kconfigwidgets"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kauth kconfig kcodecs kguiaddons ki18n kwidgetsaddons - ]; + buildInputs = [ kguiaddons ki18n qtbase ]; + propagatedBuildInputs = [ kauth kcodecs kconfig kwidgetsaddons ]; patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; + outputs = [ "out" "dev" ]; + preConfigure = '' + outputBin=dev + ''; postInstall = '' - moveToOutput "bin/preparetips5" "$dev" + moveToOutput share/man $dev ''; } diff --git a/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix b/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix index 4d35c0bbdea..34073d64f89 100644 --- a/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix +++ b/pkgs/development/libraries/kde-frameworks/kcoreaddons.nix @@ -1,12 +1,16 @@ -{ kdeFramework, lib, fetchurl, extra-cmake-modules, qtbase, qttools, shared_mime_info }: +{ + mkDerivation, lib, fetchurl, writeScript, + extra-cmake-modules, + qtbase, qttools, shared_mime_info +}: -kdeFramework { +mkDerivation { name = "kcoreaddons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; - propagatedBuildInputs = [ shared_mime_info ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools shared_mime_info ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kcrash.nix b/pkgs/development/libraries/kde-frameworks/kcrash.nix index bd008c732af..d45d73d33e4 100644 --- a/pkgs/development/libraries/kde-frameworks/kcrash.nix +++ b/pkgs/development/libraries/kde-frameworks/kcrash.nix @@ -1,8 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, kcoreaddons, kwindowsystem, qtx11extras }: +{ + mkDerivation, lib, + extra-cmake-modules, + kcoreaddons, kwindowsystem, qtbase, qtx11extras, +}: -kdeFramework { +mkDerivation { name = "kcrash"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kcoreaddons kwindowsystem qtx11extras ]; + buildInputs = [ kcoreaddons kwindowsystem qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix b/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix index 2bbbf65f898..d0c744da886 100644 --- a/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix +++ b/pkgs/development/libraries/kde-frameworks/kdbusaddons.nix @@ -1,11 +1,16 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase, qttools, qtx11extras }: +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase, qttools, qtx11extras +}: -kdeFramework { +mkDerivation { name = "kdbusaddons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ qtx11extras ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdeclarative.nix b/pkgs/development/libraries/kde-frameworks/kdeclarative.nix index 05eaffb9fbf..7aabeb02154 100644 --- a/pkgs/development/libraries/kde-frameworks/kdeclarative.nix +++ b/pkgs/development/libraries/kde-frameworks/kdeclarative.nix @@ -1,15 +1,16 @@ { - kdeFramework, lib, extra-cmake-modules, + mkDerivation, lib, extra-cmake-modules, epoxy, kconfig, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio, kpackage, kwidgetsaddons, kwindowsystem, pkgconfig, qtdeclarative }: -kdeFramework { +mkDerivation { name = "kdeclarative"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - epoxy kconfig kglobalaccel kguiaddons ki18n kiconthemes kio kpackage - kwidgetsaddons kwindowsystem qtdeclarative + buildInputs = [ + epoxy kglobalaccel kguiaddons ki18n kiconthemes kio kwidgetsaddons + kwindowsystem ]; + propagatedBuildInputs = [ kconfig kpackage qtdeclarative ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kded.nix b/pkgs/development/libraries/kde-frameworks/kded.nix index 2da1bac8f39..65377789582 100644 --- a/pkgs/development/libraries/kde-frameworks/kded.nix +++ b/pkgs/development/libraries/kde-frameworks/kded.nix @@ -1,13 +1,16 @@ { - kdeFramework, lib, extra-cmake-modules, - kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, kinit, kservice + mkDerivation, lib, propagate, + extra-cmake-modules, kdoctools, + kconfig, kcoreaddons, kcrash, kdbusaddons, kinit, kservice, qtbase, }: -kdeFramework { +mkDerivation { name = "kded"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kconfig kcoreaddons kcrash kdbusaddons kinit kservice + buildInputs = [ + kconfig kcoreaddons kcrash kdbusaddons kinit kservice qtbase ]; + outputs = [ "out" "dev" ]; + setupHook = propagate "out"; } diff --git a/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix b/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix index 1174972917e..6937a4056b2 100644 --- a/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kdelibs4support/default.nix @@ -1,30 +1,32 @@ -{ kdeFramework, lib, copyPathsToStore -, extra-cmake-modules, docbook_xml_dtd_45, kauth -, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons -, kcrash, kdbusaddons, kded, kdesignerplugin, kdoctools, kemoticons -, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio, kitemmodels -, kinit, knotifications, kparts, kservice, ktextwidgets -, kunitconversion, kwidgetsaddons, kwindowsystem, kxmlgui -, networkmanager, qtsvg, qtx11extras, xlibs +{ + mkDerivation, lib, copyPathsToStore, + docbook_xml_dtd_45, extra-cmake-modules, kdoctools, + kauth, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash, + kdbusaddons, kded, kdesignerplugin, kemoticons, kglobalaccel, kguiaddons, + ki18n, kiconthemes, kio, kitemmodels, kinit, knotifications, kparts, kservice, + ktextwidgets, kunitconversion, kwidgetsaddons, kwindowsystem, kxmlgui, + networkmanager, qtbase, qtsvg, qttools, qtx11extras, xlibs }: -# TODO: debug docbook detection - -kdeFramework { +mkDerivation { name = "kdelibs4support"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); setupHook = ./setup-hook.sh; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + nativeBuildInputs = [ extra-cmake-modules qttools ]; + propagatedNativeBuildInputs = [ kdoctools ]; + buildInputs = [ + kcompletion kconfig kded kglobalaccel ki18n kio kservice kwidgetsaddons + kxmlgui networkmanager qtsvg qtx11extras xlibs.libSM + ]; propagatedBuildInputs = [ - kauth karchive kcompletion kconfig kconfigwidgets kcoreaddons kcrash - kdbusaddons kded kdesignerplugin kemoticons kglobalaccel kguiaddons ki18n - kio kiconthemes kitemmodels kinit knotifications kparts kservice - ktextwidgets kunitconversion kwidgetsaddons kwindowsystem kxmlgui - networkmanager qtsvg qtx11extras xlibs.libSM + kauth karchive kconfigwidgets kcoreaddons kcrash kdbusaddons kdesignerplugin + kemoticons kguiaddons kiconthemes kitemmodels kinit knotifications kparts + ktextwidgets kunitconversion kwindowsystem qtbase ]; cmakeFlags = [ "-DDocBookXML4_DTD_DIR=${docbook_xml_dtd_45}/xml/dtd/docbook" "-DDocBookXML4_DTD_VERSION=4.5" ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix b/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix index 8e17a1a60c8..91b596cc4d3 100644 --- a/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix +++ b/pkgs/development/libraries/kde-frameworks/kdesignerplugin.nix @@ -1,26 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules -, kcompletion -, kconfig -, kconfigwidgets -, kcoreaddons -, kdoctools -, kiconthemes -, kio -, kitemviews -, kplotting -, ktextwidgets -, kwidgetsaddons -, kxmlgui -, sonnet +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, + kcompletion, kconfig, kconfigwidgets, kcoreaddons, kiconthemes, kio, + kitemviews, kplotting, ktextwidgets, kwidgetsaddons, kxmlgui, qttools, sonnet, }: -kdeFramework { +mkDerivation { name = "kdesignerplugin"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ - kcompletion kconfig kconfigwidgets kcoreaddons kiconthemes kio - kitemviews kplotting ktextwidgets kwidgetsaddons kxmlgui sonnet + buildInputs = [ + kcompletion kconfig kconfigwidgets kcoreaddons kiconthemes kio kitemviews + kplotting ktextwidgets kwidgetsaddons kxmlgui qttools sonnet ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdesu.nix b/pkgs/development/libraries/kde-frameworks/kdesu.nix index fcccea9161f..df60511b511 100644 --- a/pkgs/development/libraries/kde-frameworks/kdesu.nix +++ b/pkgs/development/libraries/kde-frameworks/kdesu.nix @@ -1,10 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, kcoreaddons, ki18n, kpty -, kservice +{ + mkDerivation, lib, + extra-cmake-modules, + kcoreaddons, ki18n, kpty, kservice, qtbase, }: -kdeFramework { +mkDerivation { name = "kdesu"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kcoreaddons ki18n kpty kservice ]; + buildInputs = [ kcoreaddons ki18n kpty kservice qtbase ]; + propagatedBuildInputs = [ kpty ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdnssd.nix b/pkgs/development/libraries/kde-frameworks/kdnssd.nix index 18a435139f6..9382db43e2d 100644 --- a/pkgs/development/libraries/kde-frameworks/kdnssd.nix +++ b/pkgs/development/libraries/kde-frameworks/kdnssd.nix @@ -1,15 +1,17 @@ -{ kdeFramework, lib -, extra-cmake-modules, qttools -, avahi, qtbase +{ + mkDerivation, lib, + extra-cmake-modules, + avahi, qtbase, qttools, }: -kdeFramework { +mkDerivation { name = "kdnssd"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ avahi ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ avahi qttools ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix b/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix index 99fc4c7d023..55d719e8d8c 100644 --- a/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kdoctools/default.nix @@ -1,16 +1,28 @@ -{ kdeFramework, lib, extra-cmake-modules, docbook_xml_dtd_45 -, docbook5_xsl, karchive, ki18n, perl, perlPackages +{ + mkDerivation, lib, + extra-cmake-modules, docbook_xml_dtd_45, docbook5_xsl, + karchive, ki18n, qtbase, + perl, perlPackages }: -kdeFramework { +mkDerivation { name = "kdoctools"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ karchive ki18n ]; propagatedNativeBuildInputs = [ perl perlPackages.URI ]; + buildInputs = [ karchive ki18n ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; + patches = [ ./kdoctools-no-find-docbook-xml.patch ]; + preConfigure = '' + outputBin=dev + ''; cmakeFlags = [ "-DDocBookXML4_DTD_DIR=${docbook_xml_dtd_45}/xml/dtd/docbook" "-DDocBookXSL_DIR=${docbook5_xsl}/xml/xsl/docbook" ]; - patches = [ ./kdoctools-no-find-docbook-xml.patch ]; + postFixup = '' + moveToOutput "share/doc" "$dev" + moveToOutput "share/man" "$dev" + ''; } diff --git a/pkgs/development/libraries/kde-frameworks/kemoticons.nix b/pkgs/development/libraries/kde-frameworks/kemoticons.nix index 1e31277172d..b7f4f036db5 100644 --- a/pkgs/development/libraries/kde-frameworks/kemoticons.nix +++ b/pkgs/development/libraries/kde-frameworks/kemoticons.nix @@ -1,14 +1,13 @@ -{ kdeFramework, lib -, extra-cmake-modules -, karchive -, kconfig -, kcoreaddons -, kservice +{ + mkDerivation, lib, + extra-cmake-modules, + karchive, kcoreaddons, kservice, qtbase, }: -kdeFramework { +mkDerivation { name = "kemoticons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ karchive kconfig kcoreaddons kservice ]; + buildInputs = [ karchive kcoreaddons ]; + propagatedBuildInputs = [ kservice qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix b/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix index bc7349e7453..7f325c88049 100644 --- a/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kfilemetadata/default.nix @@ -1,13 +1,16 @@ -{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules -, attr, ebook_tools, exiv2, ffmpeg, karchive, ki18n, poppler, qtbase, taglib +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, + attr, ebook_tools, exiv2, ffmpeg, karchive, ki18n, poppler, qtbase, taglib }: -kdeFramework { +mkDerivation { name = "kfilemetadata"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - attr ebook_tools exiv2 ffmpeg karchive ki18n poppler qtbase taglib + buildInputs = [ + attr ebook_tools exiv2 ffmpeg karchive ki18n poppler taglib ]; + propagatedBuildInputs = [ qtbase ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); } diff --git a/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix b/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix index 1c1336dd4d0..05fde45f17d 100644 --- a/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix +++ b/pkgs/development/libraries/kde-frameworks/kglobalaccel.nix @@ -1,14 +1,20 @@ { - kdeFramework, lib, extra-cmake-modules, + mkDerivation, lib, + extra-cmake-modules, kconfig, kcoreaddons, kcrash, kdbusaddons, kservice, kwindowsystem, - qtx11extras + qtbase, qttools, qtx11extras, }: -kdeFramework { +mkDerivation { name = "kglobalaccel"; - meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kconfig kcoreaddons kcrash kdbusaddons kservice kwindowsystem qtx11extras + buildInputs = [ + kconfig kcoreaddons kcrash kdbusaddons kservice kwindowsystem qttools + qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; + postPatch = '' + sed -i src/runtime/org.kde.kglobalaccel.service.in \ + -e "s|@CMAKE_INSTALL_PREFIX@|''${!outputBin}|" + ''; } diff --git a/pkgs/development/libraries/kde-frameworks/kguiaddons.nix b/pkgs/development/libraries/kde-frameworks/kguiaddons.nix index f93aa0967f6..5cc7e360782 100644 --- a/pkgs/development/libraries/kde-frameworks/kguiaddons.nix +++ b/pkgs/development/libraries/kde-frameworks/kguiaddons.nix @@ -1,15 +1,17 @@ { - kdeFramework, lib, + mkDerivation, lib, extra-cmake-modules, qtbase, qtx11extras, }: -kdeFramework { +mkDerivation { name = "kguiaddons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ qtx11extras ]; + buildInputs = [ qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/khtml.nix b/pkgs/development/libraries/kde-frameworks/khtml.nix index 99f6fe31e0d..3724d078aff 100644 --- a/pkgs/development/libraries/kde-frameworks/khtml.nix +++ b/pkgs/development/libraries/kde-frameworks/khtml.nix @@ -1,16 +1,19 @@ -{ kdeFramework, lib, extra-cmake-modules, giflib, karchive -, kcodecs, kglobalaccel, ki18n, kiconthemes, kio, kjs -, knotifications, kparts, ktextwidgets, kwallet, kwidgetsaddons -, kwindowsystem, kxmlgui, perl, phonon, qtx11extras, sonnet +{ + mkDerivation, lib, + extra-cmake-modules, perl, + giflib, karchive, kcodecs, kglobalaccel, ki18n, kiconthemes, kio, kjs, + knotifications, kparts, ktextwidgets, kwallet, kwidgetsaddons, kwindowsystem, + kxmlgui, phonon, qtx11extras, sonnet }: -kdeFramework { +mkDerivation { name = "khtml"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules perl ]; - propagatedBuildInputs = [ - giflib karchive kcodecs kglobalaccel ki18n kiconthemes kio kjs - knotifications kparts ktextwidgets kwallet kwidgetsaddons kwindowsystem - kxmlgui phonon qtx11extras sonnet + buildInputs = [ + giflib karchive kcodecs kglobalaccel ki18n kiconthemes kio knotifications + kparts ktextwidgets kwallet kwidgetsaddons kwindowsystem kxmlgui phonon + qtx11extras sonnet ]; + propagatedBuildInputs = [ kjs ]; } diff --git a/pkgs/development/libraries/kde-frameworks/ki18n.nix b/pkgs/development/libraries/kde-frameworks/ki18n.nix index 68f29c8314f..805cb201bd7 100644 --- a/pkgs/development/libraries/kde-frameworks/ki18n.nix +++ b/pkgs/development/libraries/kde-frameworks/ki18n.nix @@ -1,10 +1,10 @@ { - kdeFramework, lib, + mkDerivation, lib, extra-cmake-modules, gettext, python, qtbase, qtdeclarative, qtscript, }: -kdeFramework { +mkDerivation { name = "ki18n"; meta = { maintainers = [ lib.maintainers.ttuegel ]; @@ -12,5 +12,5 @@ kdeFramework { }; nativeBuildInputs = [ extra-cmake-modules ]; propagatedNativeBuildInputs = [ gettext python ]; - propagatedBuildInputs = [ qtdeclarative qtscript ]; + buildInputs = [ qtdeclarative qtscript ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix b/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix index 6102bb0d4b5..4b8e0059377 100644 --- a/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kiconthemes/default.nix @@ -1,12 +1,17 @@ -{ kdeFramework, lib, copyPathsToStore -, extra-cmake-modules -, karchive, kconfigwidgets, ki18n, breeze-icons, kitemviews, qtsvg +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, + breeze-icons, karchive, kcoreaddons, kconfigwidgets, ki18n, kitemviews, + qtbase, qtsvg, }: -kdeFramework { +mkDerivation { name = "kiconthemes"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ breeze-icons kconfigwidgets karchive ki18n kitemviews qtsvg ]; + buildInputs = [ + breeze-icons karchive kcoreaddons kconfigwidgets ki18n kitemviews + ]; + propagatedBuildInputs = [ qtbase qtsvg ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kidletime.nix b/pkgs/development/libraries/kde-frameworks/kidletime.nix index bfec344ca11..69d83eb0ff5 100644 --- a/pkgs/development/libraries/kde-frameworks/kidletime.nix +++ b/pkgs/development/libraries/kde-frameworks/kidletime.nix @@ -1,15 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules -, qtbase -, qtx11extras +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase, qtx11extras }: -kdeFramework { +mkDerivation { name = "kidletime"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ qtbase qtx11extras ]; + buildInputs = [ qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kimageformats.nix b/pkgs/development/libraries/kde-frameworks/kimageformats.nix index 2a8e825893b..26a8637bafc 100644 --- a/pkgs/development/libraries/kde-frameworks/kimageformats.nix +++ b/pkgs/development/libraries/kde-frameworks/kimageformats.nix @@ -1,14 +1,16 @@ { - kdeFramework, lib, + mkDerivation, lib, extra-cmake-modules, - ilmbase, karchive, qtbase + ilmbase, karchive, openexr, qtbase }: -kdeFramework { +let inherit (lib) getDev; in + +mkDerivation { name = "kimageformats"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ ilmbase qtbase ]; - propagatedBuildInputs = [ karchive ]; - NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR"; + buildInputs = [ karchive openexr qtbase ]; + outputs = [ "out" ]; # plugins only + NIX_CFLAGS_COMPILE = "-I${getDev ilmbase}/include/OpenEXR"; } diff --git a/pkgs/development/libraries/kde-frameworks/kinit/default.nix b/pkgs/development/libraries/kde-frameworks/kinit/default.nix index f5cfa166e91..1036ea27745 100644 --- a/pkgs/development/libraries/kde-frameworks/kinit/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kinit/default.nix @@ -1,17 +1,16 @@ { - kdeFramework, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, writeScript, extra-cmake-modules, kdoctools, kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework }: -let - inherit (lib) getLib; -in -kdeFramework { +let inherit (lib) getLib; in + +mkDerivation { name = "kinit"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kconfig kcrash ki18n kio kservice kwindowsystem ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); @@ -20,4 +19,18 @@ kdeFramework { ''-DNIXPKGS_KF5_PARTS="${getLib kparts}/lib/libKF5Parts.so.5"'' ''-DNIXPKGS_KF5_PLASMA="${getLib plasma-framework}/lib/libKF5Plasma.so.5"'' ]; + postFixup = '' + moveToOutput "lib/libexec/kf5/start_kdeinit" "$bin" + ''; + setupHook = writeScript "setup-hook.sh" '' + kinitFixupOutputHook() { + if [ $prefix != ''${!outputBin} ] && [ -d $prefix/lib ]; then + mkdir -p ''${!outputBin}/lib + find $prefix/lib -maxdepth 1 -name 'libkdeinit5_*.so' -exec ln -s \{\} ''${!outputBin}/lib \; + rmdir --ignore-fail-on-non-empty ''${!outputBin}/lib + fi + } + + fixupOutputHooks+=(kinitFixupOutputHook) + ''; } diff --git a/pkgs/development/libraries/kde-frameworks/kio/default.nix b/pkgs/development/libraries/kde-frameworks/kio/default.nix index 3f4ae5a25c2..e4e4c90bfe1 100644 --- a/pkgs/development/libraries/kde-frameworks/kio/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kio/default.nix @@ -1,21 +1,23 @@ -{ kdeFramework, lib, copyPathsToStore -, extra-cmake-modules, acl, karchive -, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons -, kdbusaddons, kdoctools, ki18n, kiconthemes, kitemviews -, kjobwidgets, knotifications, kservice, ktextwidgets, kwallet -, kwidgetsaddons, kwindowsystem, kxmlgui -, qtscript, qtx11extras, solid, fetchpatch +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, kdoctools, + karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, + kdbusaddons, ki18n, kiconthemes, kitemviews, kjobwidgets, knotifications, + kservice, ktextwidgets, kwallet, kwidgetsaddons, kwindowsystem, kxmlgui, + qtbase, qtscript, qtx11extras, solid, }: -kdeFramework { +mkDerivation { name = "kio"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ + karchive kconfigwidgets kdbusaddons ki18n kiconthemes knotifications + ktextwidgets kwallet kwidgetsaddons kwindowsystem qtscript qtx11extras + ]; propagatedBuildInputs = [ - acl karchive kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons - kdbusaddons ki18n kiconthemes kitemviews kjobwidgets knotifications kservice - ktextwidgets kwallet kwidgetsaddons kwindowsystem kxmlgui solid qtscript - qtx11extras + kbookmarks kcompletion kconfig kcoreaddons kitemviews kjobwidgets kservice + kxmlgui qtbase solid ]; patches = (copyPathsToStore (lib.readPathsFromFile ./. ./series)); } diff --git a/pkgs/development/libraries/kde-frameworks/kio/kio-debug-module-loader.patch b/pkgs/development/libraries/kde-frameworks/kio/kio-debug-module-loader.patch new file mode 100644 index 00000000000..d26af49e5eb --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kio/kio-debug-module-loader.patch @@ -0,0 +1,13 @@ +Index: kio-5.33.0/src/kiod/kiod_main.cpp +=================================================================== +--- kio-5.33.0.orig/src/kiod/kiod_main.cpp ++++ kio-5.33.0/src/kiod/kiod_main.cpp +@@ -60,7 +60,7 @@ void KIOD::loadModule(const QString &nam + module = factory->create(); + } + if (!module) { +- qCWarning(KIOD_CATEGORY) << "Error loading plugin:" << loader.errorString(); ++ qCWarning(KIOD_CATEGORY) << "Error loading plugin" << name << loader.errorString(); + return; + } + module->setModuleName(name); // makes it register to DBus diff --git a/pkgs/development/libraries/kde-frameworks/kio/series b/pkgs/development/libraries/kde-frameworks/kio/series index 77ca1545004..5330c40a330 100644 --- a/pkgs/development/libraries/kde-frameworks/kio/series +++ b/pkgs/development/libraries/kde-frameworks/kio/series @@ -1 +1,2 @@ samba-search-path.patch +kio-debug-module-loader.patch diff --git a/pkgs/development/libraries/kde-frameworks/kitemmodels.nix b/pkgs/development/libraries/kde-frameworks/kitemmodels.nix index e2f0633da8c..faeb5b16c34 100644 --- a/pkgs/development/libraries/kde-frameworks/kitemmodels.nix +++ b/pkgs/development/libraries/kde-frameworks/kitemmodels.nix @@ -1,13 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules, qtbase +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase }: -kdeFramework { +mkDerivation { name = "kitemmodels"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kitemviews.nix b/pkgs/development/libraries/kde-frameworks/kitemviews.nix index df420f8f4b9..c4c0e804e2d 100644 --- a/pkgs/development/libraries/kde-frameworks/kitemviews.nix +++ b/pkgs/development/libraries/kde-frameworks/kitemviews.nix @@ -1,13 +1,17 @@ -{ kdeFramework, lib -, extra-cmake-modules, qtbase, qttools +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase, qttools }: -kdeFramework { +mkDerivation { name = "kitemviews"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix b/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix index ddc66d2eb20..810e2bf8c84 100644 --- a/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix +++ b/pkgs/development/libraries/kde-frameworks/kjobwidgets.nix @@ -1,13 +1,12 @@ -{ kdeFramework, lib -, extra-cmake-modules -, kcoreaddons -, kwidgetsaddons -, qttools, qtx11extras +{ + mkDerivation, lib, + extra-cmake-modules, qttools, + kcoreaddons, kwidgetsaddons, qtx11extras }: -kdeFramework { +mkDerivation { name = "kjobwidgets"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ kcoreaddons kwidgetsaddons qtx11extras ]; + buildInputs = [ kcoreaddons kwidgetsaddons qtx11extras ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kjs.nix b/pkgs/development/libraries/kde-frameworks/kjs.nix index abdc15ce8df..62bcc0065b3 100644 --- a/pkgs/development/libraries/kde-frameworks/kjs.nix +++ b/pkgs/development/libraries/kde-frameworks/kjs.nix @@ -1,10 +1,12 @@ -{ kdeFramework, lib -, extra-cmake-modules -, kdoctools +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, + qtbase, }: -kdeFramework { +mkDerivation { name = "kjs"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kjsembed.nix b/pkgs/development/libraries/kde-frameworks/kjsembed.nix index 95bc02422f1..e8cd5070ae5 100644 --- a/pkgs/development/libraries/kde-frameworks/kjsembed.nix +++ b/pkgs/development/libraries/kde-frameworks/kjsembed.nix @@ -1,10 +1,13 @@ -{ kdeFramework, lib, extra-cmake-modules, kdoctools, ki18n, kjs -, qtsvg +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, qttools, + ki18n, kjs, qtsvg, }: -kdeFramework { +mkDerivation { name = "kjsembed"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ ki18n kjs qtsvg ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools qttools ]; + buildInputs = [ ki18n qtsvg ]; + propagatedBuildInputs = [ kjs ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix b/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix index 93a6b450f76..a4714c9e4ad 100644 --- a/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix +++ b/pkgs/development/libraries/kde-frameworks/kmediaplayer.nix @@ -1,12 +1,12 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules , kparts , kxmlgui }: -kdeFramework { +mkDerivation { name = "kmediaplayer"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kparts kxmlgui ]; + buildInputs = [ kparts kxmlgui ]; } diff --git a/pkgs/development/libraries/kde-frameworks/knewstuff.nix b/pkgs/development/libraries/kde-frameworks/knewstuff.nix index 002418c65ad..70f3cbb3c37 100644 --- a/pkgs/development/libraries/kde-frameworks/knewstuff.nix +++ b/pkgs/development/libraries/kde-frameworks/knewstuff.nix @@ -1,14 +1,18 @@ -{ kdeFramework, lib, extra-cmake-modules, attica, karchive -, kcompletion, kconfig, kcoreaddons, ki18n, kiconthemes, kio -, kitemviews, kservice, ktextwidgets, kwidgetsaddons, kxmlgui +{ + mkDerivation, lib, + extra-cmake-modules, + attica, karchive, kcompletion, kconfig, kcoreaddons, ki18n, kiconthemes, + kio, kitemviews, kservice, ktextwidgets, kwidgetsaddons, kxmlgui, qtbase, + qtdeclarative, }: -kdeFramework { +mkDerivation { name = "knewstuff"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - attica karchive kcompletion kconfig kcoreaddons ki18n kiconthemes kio - kitemviews kservice ktextwidgets kwidgetsaddons kxmlgui + buildInputs = [ + karchive kcompletion kconfig kcoreaddons ki18n kiconthemes kio kitemviews + ktextwidgets kwidgetsaddons qtbase qtdeclarative ]; + propagatedBuildInputs = [ attica kservice kxmlgui ]; } diff --git a/pkgs/development/libraries/kde-frameworks/knotifications.nix b/pkgs/development/libraries/kde-frameworks/knotifications.nix index c1c07957872..964e1b44115 100644 --- a/pkgs/development/libraries/kde-frameworks/knotifications.nix +++ b/pkgs/development/libraries/kde-frameworks/knotifications.nix @@ -1,4 +1,4 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules , kcodecs, kconfig, kcoreaddons, kwindowsystem , libdbusmenu @@ -6,11 +6,11 @@ , qttools, qtx11extras }: -kdeFramework { +mkDerivation { name = "knotifications"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ + buildInputs = [ kcodecs kconfig kcoreaddons kwindowsystem libdbusmenu phonon qtx11extras ]; } diff --git a/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix b/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix index 0e357aecb99..6739f96183c 100644 --- a/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix +++ b/pkgs/development/libraries/kde-frameworks/knotifyconfig.nix @@ -1,10 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, kcompletion, kconfig -, ki18n, kio, phonon +{ + mkDerivation, lib, + extra-cmake-modules, + kcompletion, kconfig, ki18n, kio, phonon, qtbase, }: -kdeFramework { +mkDerivation { name = "knotifyconfig"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kcompletion kconfig ki18n kio phonon ]; + buildInputs = [ kcompletion kconfig ki18n kio phonon ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kpackage/default.nix b/pkgs/development/libraries/kde-frameworks/kpackage/default.nix index 2953aea9a55..c0b4b631286 100644 --- a/pkgs/development/libraries/kde-frameworks/kpackage/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kpackage/default.nix @@ -1,13 +1,13 @@ { - kdeFramework, fetchurl, lib, copyPathsToStore, + mkDerivation, fetchurl, lib, copyPathsToStore, extra-cmake-modules, kdoctools, - karchive, kconfig, kcoreaddons, ki18n + karchive, kconfig, kcoreaddons, ki18n, qtbase, }: -kdeFramework { +mkDerivation { name = "kpackage"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ karchive kconfig kcoreaddons ki18n ]; + buildInputs = [ karchive kconfig kcoreaddons ki18n qtbase ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); } diff --git a/pkgs/development/libraries/kde-frameworks/kparts.nix b/pkgs/development/libraries/kde-frameworks/kparts.nix index ad6ea2dbc30..f657569277a 100644 --- a/pkgs/development/libraries/kde-frameworks/kparts.nix +++ b/pkgs/development/libraries/kde-frameworks/kparts.nix @@ -1,14 +1,17 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfig, kcoreaddons -, ki18n, kiconthemes, kio, kjobwidgets, knotifications, kservice -, ktextwidgets, kwidgetsaddons, kxmlgui +{ + mkDerivation, lib, + extra-cmake-modules, + kconfig, kcoreaddons, ki18n, kiconthemes, kio, kjobwidgets, knotifications, + kservice, ktextwidgets, kwidgetsaddons, kxmlgui }: -kdeFramework { +mkDerivation { name = "kparts"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kconfig kcoreaddons ki18n kiconthemes kio kjobwidgets knotifications - kservice ktextwidgets kwidgetsaddons kxmlgui + buildInputs = [ + kconfig kcoreaddons ki18n kiconthemes kjobwidgets knotifications kservice + kwidgetsaddons ]; + propagatedBuildInputs = [ kio ktextwidgets kxmlgui ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kpeople.nix b/pkgs/development/libraries/kde-frameworks/kpeople.nix index 6acb5e2eed5..04181fd3e13 100644 --- a/pkgs/development/libraries/kde-frameworks/kpeople.nix +++ b/pkgs/development/libraries/kde-frameworks/kpeople.nix @@ -1,12 +1,16 @@ -{ kdeFramework, lib, extra-cmake-modules, kcoreaddons, ki18n -, kitemviews, kservice, kwidgetsaddons, qtdeclarative +{ + mkDerivation, lib, + extra-cmake-modules, + kcoreaddons, ki18n, kitemviews, kservice, kwidgetsaddons, qtbase, + qtdeclarative, }: -kdeFramework { +mkDerivation { name = "kpeople"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ + buildInputs = [ kcoreaddons ki18n kitemviews kservice kwidgetsaddons qtdeclarative ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kplotting.nix b/pkgs/development/libraries/kde-frameworks/kplotting.nix index e132a45976f..5ff37fb1db1 100644 --- a/pkgs/development/libraries/kde-frameworks/kplotting.nix +++ b/pkgs/development/libraries/kde-frameworks/kplotting.nix @@ -1,13 +1,14 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules, qtbase }: -kdeFramework { +mkDerivation { name = "kplotting"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kpty.nix b/pkgs/development/libraries/kde-frameworks/kpty.nix index 8bdaacb85f8..150c5b3d2b2 100644 --- a/pkgs/development/libraries/kde-frameworks/kpty.nix +++ b/pkgs/development/libraries/kde-frameworks/kpty.nix @@ -1,8 +1,9 @@ -{ kdeFramework, lib, extra-cmake-modules, kcoreaddons, ki18n }: +{ mkDerivation, lib, extra-cmake-modules, kcoreaddons, ki18n, qtbase, }: -kdeFramework { +mkDerivation { name = "kpty"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ kcoreaddons ki18n ]; + buildInputs = [ kcoreaddons ki18n qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kross.nix b/pkgs/development/libraries/kde-frameworks/kross.nix index 0e66d95b5cc..f45fb5ecd1d 100644 --- a/pkgs/development/libraries/kde-frameworks/kross.nix +++ b/pkgs/development/libraries/kde-frameworks/kross.nix @@ -1,14 +1,14 @@ -{ kdeFramework, lib, extra-cmake-modules, kcompletion, kcoreaddons +{ mkDerivation, lib, extra-cmake-modules, kcompletion, kcoreaddons , kdoctools, ki18n, kiconthemes, kio, kparts, kwidgetsaddons -, kxmlgui, qtscript +, kxmlgui, qtbase, qtscript, qtxmlpatterns, }: -kdeFramework { +mkDerivation { name = "kross"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + buildInputs = [ kcompletion kcoreaddons kxmlgui ]; propagatedBuildInputs = [ - kcompletion kcoreaddons ki18n kiconthemes kio kparts kwidgetsaddons kxmlgui - qtscript + ki18n kiconthemes kio kparts kwidgetsaddons qtbase qtscript qtxmlpatterns ]; } diff --git a/pkgs/development/libraries/kde-frameworks/krunner.nix b/pkgs/development/libraries/kde-frameworks/krunner.nix index ec9ab7abe9f..9782320a487 100644 --- a/pkgs/development/libraries/kde-frameworks/krunner.nix +++ b/pkgs/development/libraries/kde-frameworks/krunner.nix @@ -1,14 +1,17 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfig, kcoreaddons -, ki18n, kio, kservice, plasma-framework, solid -, threadweaver +{ + mkDerivation, lib, + extra-cmake-modules, + kconfig, kcoreaddons, ki18n, kio, kservice, plasma-framework, qtbase, + qtdeclarative, solid, threadweaver }: -kdeFramework { +mkDerivation { name = "krunner"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kconfig kcoreaddons ki18n kio kservice plasma-framework solid + buildInputs = [ + kconfig kcoreaddons ki18n kio kservice qtdeclarative solid threadweaver ]; + propagatedBuildInputs = [ plasma-framework qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kservice/default.nix b/pkgs/development/libraries/kde-frameworks/kservice/default.nix index 2751a7f5d6e..3ac4f4dc268 100644 --- a/pkgs/development/libraries/kde-frameworks/kservice/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kservice/default.nix @@ -1,14 +1,19 @@ { - kdeFramework, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, bison, extra-cmake-modules, flex, - kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem + kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem, + qtbase, shared_mime_info, }: -kdeFramework { +mkDerivation { name = "kservice"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; - propagatedNativeBuildInputs = [ bison extra-cmake-modules flex ]; - nativeBuildInputs = [ kdoctools ]; - propagatedBuildInputs = [ kconfig kcoreaddons kcrash kdbusaddons ki18n kwindowsystem ]; + nativeBuildInputs = [ extra-cmake-modules kdoctools ]; + propagatedNativeBuildInputs = [ bison flex ]; + buildInputs = [ + kcrash kdbusaddons ki18n kwindowsystem qtbase + ]; + propagatedBuildInputs = [ kconfig kcoreaddons ]; + propagatedUserEnvPkgs = [ shared_mime_info ]; # for kbuildsycoca5 patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); } diff --git a/pkgs/development/libraries/kde-frameworks/ktexteditor.nix b/pkgs/development/libraries/kde-frameworks/ktexteditor.nix index fbd73c65eff..ae4d3a71d53 100644 --- a/pkgs/development/libraries/kde-frameworks/ktexteditor.nix +++ b/pkgs/development/libraries/kde-frameworks/ktexteditor.nix @@ -1,17 +1,17 @@ -{ kdeFramework, lib, copyPathsToStore -, extra-cmake-modules, perl -, karchive, kconfig, kguiaddons, kiconthemes, kparts -, libgit2 -, qtscript, qtxmlpatterns -, ki18n, kio, sonnet, syntax-highlighting +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, perl, + karchive, kconfig, kguiaddons, ki18n, kiconthemes, kio, kparts, libgit2, + qtscript, qtxmlpatterns, sonnet, syntax-highlighting }: -kdeFramework { +mkDerivation { name = "ktexteditor"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules perl ]; - propagatedBuildInputs = [ - karchive kconfig kguiaddons ki18n kiconthemes kio kparts libgit2 qtscript + buildInputs = [ + karchive kconfig kguiaddons ki18n kiconthemes kio libgit2 qtscript qtxmlpatterns sonnet syntax-highlighting ]; + propagatedBuildInputs = [ kparts ]; } diff --git a/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix b/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix index 25954c60397..8b082f7f365 100644 --- a/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix +++ b/pkgs/development/libraries/kde-frameworks/ktextwidgets.nix @@ -1,14 +1,16 @@ -{ kdeFramework, lib, extra-cmake-modules, kcompletion, kconfig -, kconfigwidgets, ki18n, kiconthemes, kservice, kwindowsystem -, sonnet +{ + mkDerivation, lib, + extra-cmake-modules, + kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kservice, + kwindowsystem, qtbase, sonnet, }: -kdeFramework { +mkDerivation { name = "ktextwidgets"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - kcompletion kconfig kconfigwidgets ki18n kiconthemes kservice kwindowsystem - sonnet + buildInputs = [ + kcompletion kconfig kconfigwidgets kiconthemes kservice kwindowsystem ]; + propagatedBuildInputs = [ ki18n qtbase sonnet ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kunitconversion.nix b/pkgs/development/libraries/kde-frameworks/kunitconversion.nix index c04ded722aa..d6c079fd83b 100644 --- a/pkgs/development/libraries/kde-frameworks/kunitconversion.nix +++ b/pkgs/development/libraries/kde-frameworks/kunitconversion.nix @@ -1,8 +1,9 @@ -{ kdeFramework, lib, extra-cmake-modules, ki18n }: +{ mkDerivation, lib, extra-cmake-modules, ki18n, qtbase, }: -kdeFramework { +mkDerivation { name = "kunitconversion"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ ki18n ]; + buildInputs = [ ki18n qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kwallet.nix b/pkgs/development/libraries/kde-frameworks/kwallet.nix index 48181040a75..fca0dedd083 100644 --- a/pkgs/development/libraries/kde-frameworks/kwallet.nix +++ b/pkgs/development/libraries/kde-frameworks/kwallet.nix @@ -1,14 +1,18 @@ -{ kdeFramework, lib, extra-cmake-modules, kconfig, kconfigwidgets -, kcoreaddons , kdbusaddons, kdoctools, ki18n, kiconthemes -, knotifications , kservice, kwidgetsaddons, kwindowsystem, libgcrypt, gpgme +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, + kconfig, kconfigwidgets, kcoreaddons , kdbusaddons, ki18n, + kiconthemes, knotifications, kservice, kwidgetsaddons, kwindowsystem, + libgcrypt, qgpgme, qtbase, }: -kdeFramework { +mkDerivation { name = "kwallet"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kconfig kconfigwidgets kcoreaddons kdbusaddons ki18n kiconthemes - knotifications kservice kwidgetsaddons kwindowsystem libgcrypt gpgme + knotifications kservice kwidgetsaddons kwindowsystem libgcrypt qgpgme ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kwayland.nix b/pkgs/development/libraries/kde-frameworks/kwayland.nix index d34687def3e..096100980d6 100644 --- a/pkgs/development/libraries/kde-frameworks/kwayland.nix +++ b/pkgs/development/libraries/kde-frameworks/kwayland.nix @@ -1,16 +1,17 @@ { - kdeFramework, lib, + mkDerivation, lib, propagateBin, extra-cmake-modules, qtbase, wayland }: -kdeFramework { +mkDerivation { name = "kwayland"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; - propagatedBuildInputs = [ wayland ]; + buildInputs = [ wayland ]; + propagatedBuildInputs = [ qtbase ]; + setupHook = propagateBin; # XDG_CONFIG_DIRS } diff --git a/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix b/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix index ce16e280faa..e607f90de8d 100644 --- a/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix +++ b/pkgs/development/libraries/kde-frameworks/kwidgetsaddons.nix @@ -1,13 +1,17 @@ -{ kdeFramework, lib -, extra-cmake-modules, qtbase, qttools +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase, qttools }: -kdeFramework { +mkDerivation { name = "kwidgetsaddons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix b/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix index 8a91bdbac52..fa9078eeb20 100644 --- a/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix @@ -1,19 +1,21 @@ { - kdeFramework, lib, copyPathsToStore, + mkDerivation, lib, copyPathsToStore, extra-cmake-modules, qtbase, qttools, qtx11extras }: -kdeFramework { +mkDerivation { name = "kwindowsystem"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - propagatedBuildInputs = [ qtx11extras ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ qttools qtx11extras ]; + propagatedBuildInputs = [ qtbase ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); preConfigure = '' - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"$out/lib/qt5/plugins\"" + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\"" ''; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch b/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch index ed24897d342..ae0da37922e 100644 --- a/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch +++ b/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch @@ -14,7 +14,7 @@ Index: kwindowsystem-5.32.0/src/pluginwrapper.cpp - foreach (const QString &entry, pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot)) { - ret << pluginDir.absoluteFilePath(entry); - } -+ QDir pluginDir(QStringLiteral(NIXPKGS_QT_PLUGIN_PATH) + QLatin1Literal("/kf5/org.kde.kwindowsystem.platforms")); ++ QDir pluginDir(QLatin1String(NIXPKGS_QT_PLUGIN_PATH) + QLatin1Literal("/kf5/org.kde.kwindowsystem.platforms")); + foreach (const QString &entry, pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot)) { + ret << pluginDir.absoluteFilePath(entry); } diff --git a/pkgs/development/libraries/kde-frameworks/kxmlgui.nix b/pkgs/development/libraries/kde-frameworks/kxmlgui.nix index ea800bf58ae..b9aede81f9a 100644 --- a/pkgs/development/libraries/kde-frameworks/kxmlgui.nix +++ b/pkgs/development/libraries/kde-frameworks/kxmlgui.nix @@ -1,14 +1,17 @@ -{ kdeFramework, lib, extra-cmake-modules, attica, kconfig -, kconfigwidgets, kglobalaccel, ki18n, kiconthemes, kitemviews -, ktextwidgets, kwindowsystem, sonnet +{ + mkDerivation, lib, + extra-cmake-modules, + attica, kconfig, kconfigwidgets, kglobalaccel, ki18n, kiconthemes, kitemviews, + ktextwidgets, kwindowsystem, qtbase, sonnet, }: -kdeFramework { +mkDerivation { name = "kxmlgui"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ - attica kconfig kconfigwidgets kglobalaccel ki18n kiconthemes kitemviews - ktextwidgets kwindowsystem sonnet + buildInputs = [ + attica kglobalaccel ki18n kiconthemes kitemviews ktextwidgets kwindowsystem + sonnet ]; + propagatedBuildInputs = [ kconfig kconfigwidgets qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix b/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix index f20f4a22394..acffde6a7cf 100644 --- a/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix +++ b/pkgs/development/libraries/kde-frameworks/kxmlrpcclient.nix @@ -1,8 +1,10 @@ -{ kdeFramework, lib, extra-cmake-modules, ki18n, kio }: +{ mkDerivation, lib, extra-cmake-modules, ki18n, kio }: -kdeFramework { +mkDerivation { name = "kxmlrpcclient"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; - propagatedBuildInputs = [ ki18n kio ]; + buildInputs = [ ki18n ]; + propagatedBuildInputs = [ kio ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix b/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix index ea2e112ff67..cdf09a48b4f 100644 --- a/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix +++ b/pkgs/development/libraries/kde-frameworks/modemmanager-qt.nix @@ -1,15 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules -, modemmanager, qtbase +{ + mkDerivation, lib, + extra-cmake-modules, + modemmanager, qtbase }: -kdeFramework { +mkDerivation { name = "modemmanager-qt"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; - propagatedBuildInputs = [ modemmanager ]; + propagatedBuildInputs = [ modemmanager qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix b/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix index 80085bb2072..3ed56bbf718 100644 --- a/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix +++ b/pkgs/development/libraries/kde-frameworks/networkmanager-qt.nix @@ -1,15 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules -, qtbase, networkmanager +{ + mkDerivation, lib, + extra-cmake-modules, + networkmanager, qtbase, }: -kdeFramework { +mkDerivation { name = "networkmanager-qt"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; - propagatedBuildInputs = [ networkmanager ]; + propagatedBuildInputs = [ networkmanager qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/kde-frameworks/oxygen-icons5.nix b/pkgs/development/libraries/kde-frameworks/oxygen-icons5.nix index 1d45b51274c..2d795bfc50c 100644 --- a/pkgs/development/libraries/kde-frameworks/oxygen-icons5.nix +++ b/pkgs/development/libraries/kde-frameworks/oxygen-icons5.nix @@ -1,15 +1,15 @@ -{ kdeFramework +{ mkDerivation , lib , extra-cmake-modules, qtbase }: -kdeFramework { +mkDerivation { name = "oxygen-icons5"; meta = { license = lib.licenses.lgpl3Plus; maintainers = [ lib.maintainers.ttuegel ]; }; - outputs = [ "out" ]; nativeBuildInputs = [ extra-cmake-modules ]; buildInputs = [ qtbase ]; + outputs = [ "out" ]; # only runtime outputs } diff --git a/pkgs/development/libraries/kde-frameworks/plasma-framework.nix b/pkgs/development/libraries/kde-frameworks/plasma-framework.nix index 2fd667af0dc..d3a81b50bf1 100644 --- a/pkgs/development/libraries/kde-frameworks/plasma-framework.nix +++ b/pkgs/development/libraries/kde-frameworks/plasma-framework.nix @@ -1,17 +1,20 @@ -{ kdeFramework, lib, fetchurl, extra-cmake-modules, kactivities, karchive -, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative -, kdoctools, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio -, knotifications, kpackage, kservice, kwayland, kwindowsystem, kxmlgui -, qtscript, qtx11extras +{ + mkDerivation, lib, + extra-cmake-modules, kdoctools, + kactivities, karchive, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, + kdeclarative, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio, + knotifications, kpackage, kservice, kwayland, kwindowsystem, kxmlgui, + qtbase, qtdeclarative, qtscript, qtx11extras, }: -kdeFramework { +mkDerivation { name = "plasma-framework"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ + buildInputs = [ kactivities karchive kconfig kconfigwidgets kcoreaddons kdbusaddons kdeclarative kglobalaccel kguiaddons ki18n kiconthemes kio knotifications - kpackage kservice kwayland kwindowsystem kxmlgui qtscript qtx11extras + kwayland kwindowsystem kxmlgui qtdeclarative qtscript qtx11extras ]; + propagatedBuildInputs = [ kpackage kservice qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/prison.nix b/pkgs/development/libraries/kde-frameworks/prison.nix new file mode 100644 index 00000000000..2d86f3fbf05 --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/prison.nix @@ -0,0 +1,14 @@ +{ + mkDerivation, lib, + extra-cmake-modules, + libdmtx, qrencode, qtbase, +}: + +mkDerivation { + name = "prison"; + meta = { maintainers = [ lib.maintainers.ttuegel ]; }; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ libdmtx qrencode ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; +} diff --git a/pkgs/development/libraries/kde-frameworks/solid.nix b/pkgs/development/libraries/kde-frameworks/solid.nix index d32acf598eb..24705d6c114 100644 --- a/pkgs/development/libraries/kde-frameworks/solid.nix +++ b/pkgs/development/libraries/kde-frameworks/solid.nix @@ -1,15 +1,17 @@ { - kdeFramework, lib, + mkDerivation, lib, bison, extra-cmake-modules, flex, - qtbase, qtdeclarative, qttools + media-player-info, qtbase, qtdeclarative, qttools }: -kdeFramework { +mkDerivation { name = "solid"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ bison extra-cmake-modules flex qttools ]; - propagatedBuildInputs = [ qtdeclarative ]; + nativeBuildInputs = [ bison extra-cmake-modules flex ]; + buildInputs = [ qtdeclarative qttools ]; + propagatedBuildInputs = [ qtbase ]; + propagatedUserEnvPkgs = [ media-player-info ]; } diff --git a/pkgs/development/libraries/kde-frameworks/sonnet.nix b/pkgs/development/libraries/kde-frameworks/sonnet.nix index ae3e72e2a46..90e2169c166 100644 --- a/pkgs/development/libraries/kde-frameworks/sonnet.nix +++ b/pkgs/development/libraries/kde-frameworks/sonnet.nix @@ -1,14 +1,15 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules , hunspell, qtbase, qttools }: -kdeFramework { +mkDerivation { name = "sonnet"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ hunspell qtbase ]; + nativeBuildInputs = [ extra-cmake-modules ]; + buildInputs = [ hunspell qttools ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix b/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix index f199321e674..82c8f323a0d 100644 --- a/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix +++ b/pkgs/development/libraries/kde-frameworks/syntax-highlighting.nix @@ -1,13 +1,14 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules, perl, qtbase, qttools }: -kdeFramework { +mkDerivation { name = "syntax-highlighting"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; - nativeBuildInputs = [ extra-cmake-modules perl qttools ]; - buildInputs = [ qtbase ]; + nativeBuildInputs = [ extra-cmake-modules perl ]; + buildInputs = [ qttools ]; + propagatedBuildInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/kde-frameworks/threadweaver.nix b/pkgs/development/libraries/kde-frameworks/threadweaver.nix index 4df3ff510cb..8861d2853ba 100644 --- a/pkgs/development/libraries/kde-frameworks/threadweaver.nix +++ b/pkgs/development/libraries/kde-frameworks/threadweaver.nix @@ -1,13 +1,16 @@ -{ kdeFramework, lib -, extra-cmake-modules, qtbase +{ + mkDerivation, lib, + extra-cmake-modules, + qtbase }: -kdeFramework { +mkDerivation { name = "threadweaver"; meta = { maintainers = [ lib.maintainers.ttuegel ]; broken = builtins.compareVersions qtbase.version "5.6.0" < 0; }; nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase ]; + propagatedBuildInputs = [ qtbase ]; + outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/libcommuni/default.nix b/pkgs/development/libraries/libcommuni/default.nix index 3632fff43bd..2dc9c6577a4 100644 --- a/pkgs/development/libraries/libcommuni/default.nix +++ b/pkgs/development/libraries/libcommuni/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, qtdeclarative, qmakeHook, which +{ stdenv, fetchFromGitHub, qtbase, qtdeclarative, qmake, which }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtdeclarative ]; - nativeBuildInputs = [ qmakeHook which ]; + nativeBuildInputs = [ qmake which ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/libkeyfinder/default.nix b/pkgs/development/libraries/libkeyfinder/default.nix index d95ada04a34..326d9c4f9d7 100644 --- a/pkgs/development/libraries/libkeyfinder/default.nix +++ b/pkgs/development/libraries/libkeyfinder/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fftw, qtbase, qmakeHook }: +{ stdenv, fetchFromGitHub, fftw, qtbase, qmake }: stdenv.mkDerivation rec { name = "libkeyfinder-${version}"; @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { owner = "ibsh"; }; - buildInputs = [ fftw qtbase qmakeHook ]; + nativeBuildInputs = [ qmake ]; + buildInputs = [ fftw qtbase ]; postPatch = '' substituteInPlace LibKeyFinder.pro \ diff --git a/pkgs/development/libraries/libqtav/default.nix b/pkgs/development/libraries/libqtav/default.nix index 7b421f4ca36..a79e6d90384 100644 --- a/pkgs/development/libraries/libqtav/default.nix +++ b/pkgs/development/libraries/libqtav/default.nix @@ -1,20 +1,20 @@ -{ stdenv, lib, fetchFromGitHub, extra-cmake-modules, makeQtWrapper +{ mkDerivation, lib, fetchFromGitHub, extra-cmake-modules , qtbase, qtmultimedia, qtquick1, qttools , mesa, libX11 , libass, openal, ffmpeg, libuchardet , alsaLib, libpulseaudio, libva }: -with stdenv.lib; +with lib; -stdenv.mkDerivation rec { +mkDerivation rec { name = "libqtav-${version}"; # Awaiting upcoming `v1.12.0` release. `v1.11.0` is not supporting cmake which is the # the reason behind taking an unstable git rev. version = "unstable-2017-03-30"; - nativeBuildInputs = [ extra-cmake-modules makeQtWrapper qttools ]; + nativeBuildInputs = [ extra-cmake-modules qttools ]; buildInputs = [ qtbase qtmultimedia qtquick1 mesa libX11 @@ -45,12 +45,6 @@ stdenv.mkDerivation rec { cp -a "./bin/"* "$out/bin" ''; - postFixup = '' - for i in `find $out/bin -maxdepth 1 -xtype f -executable`; do - wrapQtProgram "$i" - done - ''; - meta = { description = "A multimedia playback framework based on Qt + FFmpeg."; #license = licenses.lgpl21; # For the libraries / headers only. diff --git a/pkgs/development/libraries/qmltermwidget/default.nix b/pkgs/development/libraries/qmltermwidget/default.nix index bb058711b2e..e8e0aba7a24 100644 --- a/pkgs/development/libraries/qmltermwidget/default.nix +++ b/pkgs/development/libraries/qmltermwidget/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, qtbase, qtquick1, qmakeHook, qtmultimedia }: +{ stdenv, fetchgit, qtbase, qtquick1, qmake, qtmultimedia }: stdenv.mkDerivation rec { version = "0.1.0"; @@ -11,11 +11,11 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qtquick1 qtmultimedia ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; patchPhase = '' substituteInPlace qmltermwidget.pro \ - --replace '$$[QT_INSTALL_QML]' "/lib/qt5/qml/" + --replace '$$[QT_INSTALL_QML]' "/$qtQmlPrefix/" ''; installFlags = [ "INSTALL_ROOT=$(out)" ]; diff --git a/pkgs/development/libraries/qscintilla/default.nix b/pkgs/development/libraries/qscintilla/default.nix index 928ff5f788b..c2e6c3cb3b5 100644 --- a/pkgs/development/libraries/qscintilla/default.nix +++ b/pkgs/development/libraries/qscintilla/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, unzip , qt4 ? null, qmake4Hook ? null -, withQt5 ? false, qtbase ? null, qmakeHook ? null +, withQt5 ? false, qtbase ? null, qmake ? null }: stdenv.mkDerivation rec { @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; buildInputs = if withQt5 then [ qtbase ] else [ qt4 ]; - nativeBuildInputs = [ unzip ] ++ (if withQt5 then [ qmakeHook ] else [ qmake4Hook ]); + nativeBuildInputs = [ unzip ] ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]); enableParallelBuilding = true; diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index cc6475d31b6..b250ae8b952 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -18,8 +18,9 @@ existing packages here and modify it as necessary. 1. Update the URL in `./fetch.sh`. 2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION/` from the top of the Nixpkgs tree. -3. Use `nox-review wip` to check that everything builds. -4. Commit the changes and open a pull request. +3. Update `qtCompatVersion` below if the minor version number changes. +4. Check that the new packages build correctly. +5. Commit the changes and open a pull request. */ @@ -32,21 +33,42 @@ existing packages here and modify it as necessary. # options developerBuild ? false, decryptSslTraffic ? false, + debug ? null, }: with stdenv.lib; let + qtCompatVersion = "5.6"; + mirror = "http://download.qt.io"; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; + mkDerivation = args: + stdenv.mkDerivation (args // { + + qmakeFlags = + (args.qmakeFlags or []) + ++ optional (debug != null) + (if debug then "CONFIG+=debug" else "CONFIG+=release"); + + cmakeFlags = + (args.cmakeFlags or []) + ++ [ "-DBUILD_TESTING=OFF" ] + ++ optional (debug != null) + (if debug then "-DCMAKE_BUILD_TYPE=Debug" + else "-DCMAKE_BUILD_TYPE=Release"); + + enableParallelBuilding = args.enableParallelBuilding or true; + + }); + qtSubmodule = args: let inherit (args) name; version = args.version or srcs."${name}".version; src = args.src or srcs."${name}".src; - inherit (stdenv) mkDerivation; in mkDerivation (args // { name = "${name}-${version}"; inherit src; @@ -54,7 +76,7 @@ let propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); nativeBuildInputs = (args.nativeBuildInputs or []) - ++ [ perl self.qmakeHook ]; + ++ [ perl self.qmake ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; @@ -63,16 +85,22 @@ let setupHook = ../qtsubmodule-setup-hook.sh; - enableParallelBuilding = args.enableParallelBuilding or true; - - meta = self.qtbase.meta // (args.meta or {}); + meta = { + homepage = http://www.qt.io; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ qknight ttuegel periklis ]; + platforms = platforms.unix; + } // (args.meta or {}); }); addPackages = self: with self; let - callPackage = self.newScope { inherit qtSubmodule srcs; }; + callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; in { + inherit mkDerivation; + qtbase = callPackage ./qtbase { inherit bison cups harfbuzz mesa; inherit developerBuild decryptSslTraffic; @@ -119,15 +147,10 @@ let qtwebchannel qtwebengine qtwebkit qtwebsockets qtx11extras qtxmlpatterns ]; - makeQtWrapper = - makeSetupHook - { deps = [ makeWrapper ]; } - (if stdenv.isDarwin then ../make-qt-wrapper-darwin.sh else ../make-qt-wrapper.sh); - - qmakeHook = - makeSetupHook - { deps = [ self.qtbase.dev ]; } - (if stdenv.isDarwin then ../qmake-hook-darwin.sh else ../qmake-hook.sh); + qmake = makeSetupHook { + deps = [ self.qtbase.dev ]; + substitutions = { inherit (stdenv) isDarwin; }; + } ../qmake-hook.sh; }; self = makeScope newScope addPackages; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix index 289a1bbac6c..4e7c7ea5456 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchgit, copyPathsToStore -, srcs +, srcs, qtCompatVersion , xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi , xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilwm, libxkbcommon @@ -32,6 +32,7 @@ stdenv.mkDerivation { name = "qtbase-${srcs.qtbase.version}"; inherit (srcs.qtbase) src version; + inherit qtCompatVersion; outputs = [ "out" "dev" ]; @@ -94,18 +95,22 @@ stdenv.mkDerivation { # Note on the above: \x27 is a way if including a single-quote # character in the sed string arguments. + qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins"; + qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml"; + qtDocPrefix = "share/doc/qt-${qtCompatVersion}"; + setOutputFlags = false; preConfigure = '' export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" export MAKEFLAGS=-j$NIX_BUILD_CORES configureFlags+="\ - -plugindir $out/lib/qt5/plugins \ - -importdir $out/lib/qt5/imports \ - -qmldir $out/lib/qt5/qml \ - -docdir $out/share/doc/qt5" + -plugindir $out/$qtPluginPrefix \ + -qmldir $out/$qtQmlPrefix \ + -docdir $out/$qtDocPrefix" - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\"" + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/$qtPluginPrefix/platforms\"" ''; prefixKey = "-prefix "; @@ -232,8 +237,9 @@ stdenv.mkDerivation { postInstall = '' find "$out" -name "*.cmake" | while read file; do substituteInPlace "$file" \ - --subst-var-by NIX_OUT "$out" \ - --subst-var-by NIX_DEV "$dev" + --subst-var-by NIX_OUT "''${!outputLib}" \ + --subst-var-by NIX_DEV "''${!outputDev}" \ + --subst-var-by NIX_BIN "''${!outputBin}" done ''; diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-resolv.patch index a0b546aaa3a..e9d3c2734d1 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-resolv.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/dlopen-resolv.patch @@ -1,8 +1,8 @@ -Index: qtbase-opensource-src-5.6.1/src/network/kernel/qdnslookup_unix.cpp +Index: qtbase-opensource-src-5.6.2/src/network/kernel/qdnslookup_unix.cpp =================================================================== ---- qtbase-opensource-src-5.6.1.orig/src/network/kernel/qdnslookup_unix.cpp -+++ qtbase-opensource-src-5.6.1/src/network/kernel/qdnslookup_unix.cpp -@@ -78,7 +78,7 @@ static bool resolveLibraryInternal() +--- qtbase-opensource-src-5.6.2.orig/src/network/kernel/qdnslookup_unix.cpp ++++ qtbase-opensource-src-5.6.2/src/network/kernel/qdnslookup_unix.cpp +@@ -83,7 +83,7 @@ static bool resolveLibraryInternal() if (!lib.load()) #endif { @@ -11,10 +11,10 @@ Index: qtbase-opensource-src-5.6.1/src/network/kernel/qdnslookup_unix.cpp if (!lib.load()) return false; } -Index: qtbase-opensource-src-5.6.1/src/network/kernel/qhostinfo_unix.cpp +Index: qtbase-opensource-src-5.6.2/src/network/kernel/qhostinfo_unix.cpp =================================================================== ---- qtbase-opensource-src-5.6.1.orig/src/network/kernel/qhostinfo_unix.cpp -+++ qtbase-opensource-src-5.6.1/src/network/kernel/qhostinfo_unix.cpp +--- qtbase-opensource-src-5.6.2.orig/src/network/kernel/qhostinfo_unix.cpp ++++ qtbase-opensource-src-5.6.2/src/network/kernel/qhostinfo_unix.cpp @@ -94,7 +94,7 @@ static bool resolveLibraryInternal() if (!lib.load()) #endif diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.6/qtbase/library-paths.patch similarity index 65% rename from pkgs/development/libraries/qt-5/5.6/qtbase/nix-profiles-library-paths.patch rename to pkgs/development/libraries/qt-5/5.6/qtbase/library-paths.patch index 68163fc0c31..fecbce59050 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/nix-profiles-library-paths.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/library-paths.patch @@ -6,12 +6,12 @@ Index: qtbase-opensource-src-5.6.2/src/corelib/kernel/qcoreapplication.cpp QStringList *app_libpaths = new QStringList; coreappdata()->app_libpaths.reset(app_libpaths); -+ // Add library paths derived from NIX_PROFILES. -+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); -+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins"); -+ for (const QByteArray &profile: profiles) { -+ if (!profile.isEmpty()) { -+ app_libpaths->append(QFile::decodeName(profile) + plugindir); ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); + } + } + diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/series b/pkgs/development/libraries/qt-5/5.6/qtbase/series index 3527a91c84d..bacb3a4ed89 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/series +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/series @@ -4,7 +4,6 @@ dlopen-libXcursor.patch dlopen-openssl.patch dlopen-dbus.patch xdg-config-dirs.patch -nix-profiles-library-paths.patch +library-paths.patch compose-search-path.patch libressl.patch -qpa-platform-plugin-path.patch diff --git a/pkgs/development/libraries/qt-5/5.6/qtbase/tzdir.patch b/pkgs/development/libraries/qt-5/5.6/qtbase/tzdir.patch index 16e88d7c4f0..f197211ded7 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtbase/tzdir.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtbase/tzdir.patch @@ -1,8 +1,8 @@ -Index: qtbase-opensource-src-5.6.0/src/corelib/tools/qtimezoneprivate_tz.cpp +Index: qtbase-opensource-src-5.6.2/src/corelib/tools/qtimezoneprivate_tz.cpp =================================================================== ---- qtbase-opensource-src-5.6.0.orig/src/corelib/tools/qtimezoneprivate_tz.cpp -+++ qtbase-opensource-src-5.6.0/src/corelib/tools/qtimezoneprivate_tz.cpp -@@ -62,7 +62,10 @@ typedef QHash Q +--- qtbase-opensource-src-5.6.2.orig/src/corelib/tools/qtimezoneprivate_tz.cpp ++++ qtbase-opensource-src-5.6.2/src/corelib/tools/qtimezoneprivate_tz.cpp +@@ -64,7 +64,10 @@ typedef QHash Q // Parse zone.tab table, assume lists all installed zones, if not will need to read directories static QTzTimeZoneHash loadTzTimeZones() { @@ -14,7 +14,7 @@ Index: qtbase-opensource-src-5.6.0/src/corelib/tools/qtimezoneprivate_tz.cpp if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); -@@ -560,12 +563,18 @@ void QTzTimeZonePrivate::init(const QByt +@@ -636,12 +639,18 @@ void QTzTimeZonePrivate::init(const QByt if (!tzif.open(QIODevice::ReadOnly)) return; } else { diff --git a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/default.nix index 9b6a6c46176..57b8e53b215 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/default.nix @@ -5,4 +5,8 @@ qtSubmodule { patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); qtInputs = [ qtbase qtsvg qtxmlpatterns ]; nativeBuildInputs = [ python2 ]; + + preConfigure = '' + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\"" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/import-paths.patch b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/import-paths.patch new file mode 100644 index 00000000000..a942d837c30 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/import-paths.patch @@ -0,0 +1,20 @@ +Index: qtdeclarative-opensource-src-5.6.2/src/qml/qml/qqmlimport.cpp +=================================================================== +--- qtdeclarative-opensource-src-5.6.2.orig/src/qml/qml/qqmlimport.cpp ++++ qtdeclarative-opensource-src-5.6.2/src/qml/qml/qqmlimport.cpp +@@ -1568,6 +1568,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); diff --git a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/nix-profiles-import-paths.patch deleted file mode 100644 index 06b244b974f..00000000000 --- a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/nix-profiles-import-paths.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp -=================================================================== ---- qtdeclarative-opensource-src-5.5.1.orig/src/qml/qml/qqmlimport.cpp -+++ qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp -@@ -1549,6 +1549,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); - addImportPath(installImportsPath); - -+ // Add library paths derived from NIX_PROFILES. -+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); -+ const QString qmldir = QString::fromLatin1("/lib/qt5/qml"); -+ Q_FOREACH (const QByteArray &profile, profiles) { -+ if (!profile.isEmpty()) { -+ addImportPath(QFile::decodeName(profile) + qmldir); -+ } -+ } -+ - // env import paths - QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); - if (!envImportPath.isEmpty()) { diff --git a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/series index 7dbe197c56e..38abb916a50 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtdeclarative/series +++ b/pkgs/development/libraries/qt-5/5.6/qtdeclarative/series @@ -1 +1 @@ -nix-profiles-import-paths.patch +import-paths.patch diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport/0001-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.6/qtserialport/0001-dlopen-serialport-udev.patch index 3a813dc8007..9893fdff9a5 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtserialport/0001-dlopen-serialport-udev.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport/0001-dlopen-serialport-udev.patch @@ -11,15 +11,15 @@ diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h index 6f2cabd..81b9849 100644 --- a/src/serialport/qtudev_p.h +++ b/src/serialport/qtudev_p.h -@@ -105,9 +105,9 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN +@@ -105,10 +105,9 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN inline bool resolveSymbols(QLibrary *udevLibrary) { if (!udevLibrary->isLoaded()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); if (!udevLibrary->load()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); if (!udevLibrary->load()) { qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); return false; diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix index 2bffd0a2bd6..925e8a808f2 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport/default.nix @@ -1,12 +1,12 @@ -{ qtSubmodule, qtbase, substituteAll, systemd }: +{ stdenv, qtSubmodule, lib, copyPathsToStore, qtbase, substituteAll, systemd }: + +let inherit (lib) getLib optional; in qtSubmodule { name = "qtserialport"; qtInputs = [ qtbase ]; - patches = [ - (substituteAll { - src = ./0001-dlopen-serialport-udev.patch; - libudev = systemd.lib; - }) - ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + NIX_CFLAGS_COMPILE = + optional stdenv.isLinux + ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; } diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport/qtserialport-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.6/qtserialport/qtserialport-dlopen-udev.patch new file mode 100644 index 00000000000..65bb64710eb --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport/qtserialport-dlopen-udev.patch @@ -0,0 +1,22 @@ +Index: qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h +=================================================================== +--- qtserialport-opensource-src-5.8.0.orig/src/serialport/qtudev_p.h ++++ qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h +@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QL + inline bool resolveSymbols(QLibrary *udevLibrary) + { + if (!udevLibrary->isLoaded()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); ++#endif + if (!udevLibrary->load()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); ++#endif + if (!udevLibrary->load()) { + qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); + return false; diff --git a/pkgs/development/libraries/qt-5/5.6/qtserialport/series b/pkgs/development/libraries/qt-5/5.6/qtserialport/series new file mode 100644 index 00000000000..83f4abf094e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtserialport/series @@ -0,0 +1 @@ +qtserialport-dlopen-udev.patch diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nix index 1234c825b14..7ffc42fe7f6 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtwebengine/default.nix @@ -42,10 +42,9 @@ qtSubmodule { sed -i -e 's,/cert.pem,/certs/ca-bundle.crt,' src/3rdparty/chromium/third_party/boringssl/src/crypto/x509/x509_def.c configureFlags+="\ - -plugindir $out/lib/qt5/plugins \ - -importdir $out/lib/qt5/imports \ - -qmldir $out/lib/qt5/qml \ - -docdir $out/share/doc/qt5" + -plugindir $out/$qtPluginPrefix \ + -qmldir $out/$qtQmlPrefix \ + -docdir $out/$qtDocPrefix" ''; propagatedBuildInputs = [ # Image formats diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/0003-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.6/qtwebkit/0003-dlopen-webkit-udev.patch index 1c360cd81aa..19de7d99c85 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtwebkit/0003-dlopen-webkit-udev.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/0003-dlopen-webkit-udev.patch @@ -11,18 +11,18 @@ diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform index 60ff317..da8ac69 100644 --- a/Source/WebCore/platform/qt/GamepadsQt.cpp +++ b/Source/WebCore/platform/qt/GamepadsQt.cpp -@@ -111,12 +111,12 @@ private: +@@ -111,13 +111,12 @@ private: bool load() { m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); ++ m_libUdev.setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); m_loaded = m_libUdev.load(); if (resolveMethods()) return true; - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); ++ m_libUdev.setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); m_loaded = m_libUdev.load(); return resolveMethods(); } diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix index 23a45dd44ed..664281aac31 100644 --- a/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/default.nix @@ -1,39 +1,40 @@ -{ qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors +{ qtSubmodule, stdenv, copyPathsToStore, lib +, qtdeclarative, qtlocation, qtsensors , fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt , sqlite, systemd, glib, gst_all_1 , bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby +, darwin , substituteAll , flashplayerFix ? false }: -with stdenv.lib; +let inherit (lib) optional optionals getLib; in qtSubmodule { name = "qtwebkit"; qtInputs = [ qtdeclarative qtlocation qtsensors ]; - buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]; + buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ] + ++ optionals (stdenv.isDarwin) (with darwin.apple_sdk.frameworks; [ OpenGL ]); nativeBuildInputs = [ bison2 flex gdb gperf perl pkgconfig python2 ruby ]; - patches = - let dlopen-webkit-nsplugin = substituteAll { - src = ./0001-dlopen-webkit-nsplugin.patch; - gtk = gtk2.out; - gdk_pixbuf = gdk_pixbuf.out; - }; - dlopen-webkit-gtk = substituteAll { - src = ./0002-dlopen-webkit-gtk.patch; - gtk = gtk2.out; - }; - dlopen-webkit-udev = substituteAll { - src = ./0003-dlopen-webkit-udev.patch; - libudev = systemd.lib; - }; - in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] - ++ [ dlopen-webkit-udev ]; + + __impureHostDeps = optionals (stdenv.isDarwin) [ + "/usr/lib/libicucore.dylib" + ]; + + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + + NIX_CFLAGS_COMPILE = + optionals flashplayerFix + [ + ''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"'' + ''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"'' + ] + ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; # Hack to avoid TMPDIR in RPATHs. preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; - meta.maintainers = with stdenv.lib.maintainers; [ abbradar ]; + meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ]; } diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-dlopen-gtk.patch b/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-dlopen-gtk.patch new file mode 100644 index 00000000000..e34eda592af --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-dlopen-gtk.patch @@ -0,0 +1,64 @@ +Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginPackageQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp +@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* modu + } + } + ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (library.load()) { + typedef void *(*gtk_init_check_ptr)(int*, char***); + gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); +Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginViewQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp +@@ -697,7 +697,11 @@ static Display *getPluginDisplay() + // support gdk based plugins (like flash) that use a different X connection. + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + +Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +@@ -64,7 +64,11 @@ static Display* getPluginDisplay() + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); + ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + +Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType typ + + static bool initializeGtk() + { ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (!gtkLibrary.load()) + return false; + typedef void* (*gtk_init_ptr)(void*, void*); diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-dlopen-udev.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0004-icucore-darwin.patch b/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icucore-darwin.patch similarity index 75% rename from pkgs/development/libraries/qt-5/5.8/qtwebkit/0004-icucore-darwin.patch rename to pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icucore-darwin.patch index a1cc1892288..63c653da94e 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0004-icucore-darwin.patch +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/qtwebkit-icucore-darwin.patch @@ -1,6 +1,8 @@ +Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri +=================================================================== --- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri +++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri -@@ -12,7 +12,7 @@ +@@ -12,7 +12,7 @@ mac { # Mac OS does ship libicu but not the associated header files. # Therefore WebKit provides adequate header files. INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH diff --git a/pkgs/development/libraries/qt-5/5.6/qtwebkit/series b/pkgs/development/libraries/qt-5/5.6/qtwebkit/series new file mode 100644 index 00000000000..140e2a3dd4e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.6/qtwebkit/series @@ -0,0 +1,3 @@ +qtwebkit-dlopen-gtk.patch +qtwebkit-dlopen-udev.patch +qtwebkit-icucore-darwin.patch diff --git a/pkgs/development/libraries/qt-5/5.8/default.nix b/pkgs/development/libraries/qt-5/5.8/default.nix index 2865a879f47..fd4769a02c6 100644 --- a/pkgs/development/libraries/qt-5/5.8/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/default.nix @@ -9,8 +9,9 @@ top-level attribute to `top-level/all-packages.nix`. 1. Update the URL in `maintainers/scripts/generate-qt.sh`. 2. From the top of the Nixpkgs tree, run `./maintainers/scripts/generate-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`. -3. Check that the new packages build correctly. -4. Commit the changes and open a pull request. +3. Update `qtCompatVersion` below if the minor version number changes. +4. Check that the new packages build correctly. +5. Commit the changes and open a pull request. */ @@ -23,21 +24,42 @@ top-level attribute to `top-level/all-packages.nix`. # options developerBuild ? false, decryptSslTraffic ? false, + debug ? null, }: with stdenv.lib; let + qtCompatVersion = "5.8"; + mirror = "http://download.qt.io"; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; + mkDerivation = args: + stdenv.mkDerivation (args // { + + qmakeFlags = + (args.qmakeFlags or []) + ++ optional (debug != null) + (if debug then "CONFIG+=debug" else "CONFIG+=release"); + + cmakeFlags = + (args.cmakeFlags or []) + ++ [ "-DBUILD_TESTING=OFF" ] + ++ optional (debug != null) + (if debug then "-DCMAKE_BUILD_TYPE=Debug" + else "-DCMAKE_BUILD_TYPE=Release"); + + enableParallelBuilding = args.enableParallelBuilding or true; + + }); + qtSubmodule = args: let inherit (args) name; version = args.version or srcs."${name}".version; src = args.src or srcs."${name}".src; - inherit (stdenv) mkDerivation; in mkDerivation (args // { name = "${name}-${version}"; inherit src; @@ -45,7 +67,7 @@ let propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); nativeBuildInputs = (args.nativeBuildInputs or []) - ++ [ perl self.qmakeHook ]; + ++ [ perl self.qmake ]; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; @@ -54,19 +76,26 @@ let setupHook = ../qtsubmodule-setup-hook.sh; - enableParallelBuilding = args.enableParallelBuilding or true; - - meta = self.qtbase.meta // (args.meta or {}); + meta = { + homepage = http://www.qt.io; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ qknight ttuegel periklis ]; + platforms = platforms.unix; + } // (args.meta or {}); }); addPackages = self: with self; let - callPackage = self.newScope { inherit qtSubmodule srcs; }; + callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; in { + inherit mkDerivation; + qtbase = callPackage ./qtbase { inherit (srcs.qtbase) src version; inherit bison cups harfbuzz mesa; + inherit dconf gtk3; inherit developerBuild decryptSslTraffic; }; @@ -106,16 +135,10 @@ let ] ++ optional (!stdenv.isDarwin) qtwayland ++ optional (stdenv.isDarwin) qtmacextras); - makeQtWrapper = - makeSetupHook - { deps = [ makeWrapper ] ++ optionals (!stdenv.isDarwin) [ dconf.lib gtk3 ]; } - (if stdenv.isDarwin then ../make-qt-wrapper-darwin.sh else ../make-qt-wrapper.sh); - - qmakeHook = - makeSetupHook - { deps = [ self.qtbase.dev ]; } - (if stdenv.isDarwin then ../qmake-hook-darwin.sh else ../qmake-hook.sh); - + qmake = makeSetupHook { + deps = [ self.qtbase.dev ]; + substitutions = { inherit (stdenv) isDarwin; }; + } ../qmake-hook.sh; }; self = makeScope newScope addPackages; diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch index c43653558e3..3408b235e0c 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/cmake-paths.patch @@ -306,11 +306,11 @@ Index: qtbase-opensource-src-5.8.0/mkspecs/features/data/cmake/Qt5PluginTarget.c !!IF !isEmpty(CMAKE_RELEASE_TYPE) -_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\") -+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\") ++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_RELEASE}\") !!ENDIF !!IF !isEmpty(CMAKE_DEBUG_TYPE) -_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\") -+_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_OUT@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\") ++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"@NIX_BIN@/$${CMAKE_PLUGIN_LOCATION_DEBUG}\") !!ENDIF list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch index d0bea4afaa3..225d47f8e22 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/compose-search-path.patch @@ -12,7 +12,7 @@ Index: qtbase-opensource-src-5.8.0/src/plugins/platforminputcontexts/compose/gen - m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale")); m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale")); m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale")); -+ m_possibleLocations.append(QStringLiteral(NIXPKGS_QTCOMPOSE)); ++ m_possibleLocations.append(QLatin1String(NIXPKGS_QTCOMPOSE)); } QString TableGenerator::findComposeFile() diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix index ee6399c2bd4..93be661b7da 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix @@ -1,13 +1,13 @@ { stdenv, lib, copyPathsToStore, - src, version, + src, version, qtCompatVersion, coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2, ruby, # darwin support darwin, libiconv, libcxx, - dbus, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite, + dbus, dconf, fontconfig, freetype, glib, gtk3, harfbuzz, icu, libX11, libXcomposite, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff, libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, sqlite, udev, xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, xlibs, @@ -32,7 +32,7 @@ in stdenv.mkDerivation { name = "qtbase-${version}"; - inherit src version; + inherit qtCompatVersion src version; propagatedBuildInputs = [ @@ -76,7 +76,7 @@ stdenv.mkDerivation { [ bison flex gperf lndir perl pkgconfig python2 ] ++ lib.optional (!stdenv.isDarwin) patchelf; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "bin" ]; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); @@ -117,18 +117,21 @@ stdenv.mkDerivation { # Note on the above: \x27 is a way if including a single-quote # character in the sed string arguments. + qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins"; + qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml"; + qtDocPrefix = "share/doc/qt-${qtCompatVersion}"; + setOutputFlags = false; preConfigure = '' export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" export MAKEFLAGS=-j$NIX_BUILD_CORES configureFlags+="\ - -plugindir $out/lib/qt5/plugins \ - -importdir $out/lib/qt5/imports \ - -qmldir $out/lib/qt5/qml \ - -docdir $out/share/doc/qt5" + -plugindir $out/$qtPluginPrefix \ + -qmldir $out/$qtQmlPrefix \ + -docdir $out/$qtDocPrefix" - NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\"" + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\"" ''; @@ -143,6 +146,12 @@ stdenv.mkDerivation { ++ lib.optional mesaSupported ''-DNIXPKGS_MESA_GL="${mesa.out}/lib/libGL"'' + ++ lib.optionals (!stdenv.isDarwin) + [ + ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' + ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' + ] + ++ lib.optionals stdenv.isDarwin [ "-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090" @@ -254,29 +263,33 @@ stdenv.mkDerivation { enableParallelBuilding = true; - postInstall = '' - find "$out" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "$out" \ - --subst-var-by NIX_DEV "$dev" - done - ''; + postInstall = + # Hardcode some CMake module paths. + '' + find "$out" -name "*.cmake" | while read file; do + substituteInPlace "$file" \ + --subst-var-by NIX_OUT "''${!outputLib}" \ + --subst-var-by NIX_DEV "''${!outputDev}" \ + --subst-var-by NIX_BIN "''${!outputBin}" + done + ''; - preFixup = '' - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "$dev" - moveToOutput "include" "$dev" - moveToOutput "mkspecs" "$dev" + preFixup = + # Move selected outputs. + '' + moveToOutput "bin" "$dev" + moveToOutput "include" "$dev" + moveToOutput "mkspecs" "$dev" - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "$dev/share" - moveToOutput "share/doc" "$dev" - ''; + mkdir -p "$dev/share" + moveToOutput "share/doc" "$dev" + + moveToOutput "$qtPluginPrefix" "$bin" + ''; postFixup = + # Don't retain build-time dependencies like gdb. '' - # Don't retain build-time dependencies like gdb. sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri '' diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch similarity index 65% rename from pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch rename to pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch index 553c71d0ace..38eecbe2c64 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch @@ -6,12 +6,12 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp QStringList *app_libpaths = new QStringList; coreappdata()->app_libpaths.reset(app_libpaths); -+ // Add library paths derived from NIX_PROFILES. -+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); -+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins"); -+ for (const QByteArray &profile: profiles) { -+ if (!profile.isEmpty()) { -+ app_libpaths->append(QFile::decodeName(profile) + plugindir); ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); + } + } + diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch new file mode 100644 index 00000000000..8e5e2c71828 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/qgtk-env.patch @@ -0,0 +1,36 @@ +Index: qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp +=================================================================== +--- qtbase-opensource-src-5.8.0.orig/src/plugins/platformthemes/gtk3/main.cpp ++++ qtbase-opensource-src-5.8.0/src/plugins/platformthemes/gtk3/main.cpp +@@ -39,6 +39,7 @@ + + #include + #include "qgtk3theme.h" ++#include + + QT_BEGIN_NAMESPACE + +@@ -54,8 +55,22 @@ public: + QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms) + { + Q_UNUSED(params); +- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) ++ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) { ++ ++#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS ++ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':'); ++ XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS); ++ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':'))); ++#endif ++ ++#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES ++ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':'); ++ GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES); ++ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':'))); ++#endif ++ + return new QGtk3Theme; ++ } + + return 0; + } diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch deleted file mode 100644 index 270116e1978..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch +++ /dev/null @@ -1,43 +0,0 @@ -Index: qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp -=================================================================== ---- qtbase-opensource-src-5.8.0.orig/src/gui/kernel/qplatformintegrationfactory.cpp -+++ qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp -@@ -62,9 +62,10 @@ QPlatformIntegration *QPlatformIntegrati - // Try loading the plugin from platformPluginPath first: - if (!platformPluginPath.isEmpty()) { - QCoreApplication::addLibraryPath(platformPluginPath); -- if (QPlatformIntegration *ret = qLoadPlugin(directLoader(), platform, paramList, argc, argv)) -- return ret; - } -+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH)); -+ if (QPlatformIntegration *ret = qLoadPlugin(directLoader(), platform, paramList, argc, argv)) -+ return ret; - #else - Q_UNUSED(platformPluginPath); - #endif -@@ -84,15 +85,16 @@ QStringList QPlatformIntegrationFactory: - #ifndef QT_NO_LIBRARY - if (!platformPluginPath.isEmpty()) { - QCoreApplication::addLibraryPath(platformPluginPath); -- list = directLoader()->keyMap().values(); -- if (!list.isEmpty()) { -- const QString postFix = QLatin1String(" (from ") -- + QDir::toNativeSeparators(platformPluginPath) -- + QLatin1Char(')'); -- const QStringList::iterator end = list.end(); -- for (QStringList::iterator it = list.begin(); it != end; ++it) -- (*it).append(postFix); -- } -+ } -+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH)); -+ list = directLoader()->keyMap().values(); -+ if (!list.isEmpty()) { -+ const QString postFix = QLatin1String(" (from ") -+ + QDir::toNativeSeparators(platformPluginPath) -+ + QLatin1Char(')'); -+ const QStringList::iterator end = list.end(); -+ for (QStringList::iterator it = list.begin(); it != end; ++it) -+ (*it).append(postFix); - } - #else - Q_UNUSED(platformPluginPath); diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/series b/pkgs/development/libraries/qt-5/5.8/qtbase/series index 47400cf7aa3..f3387694518 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/series +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/series @@ -2,9 +2,9 @@ dlopen-resolv.patch tzdir.patch dlopen-libXcursor.patch xdg-config-dirs.patch -nix-profiles-library-paths.patch +library-paths.patch libressl.patch -qpa-platform-plugin-path.patch dlopen-gl.patch compose-search-path.patch cmake-paths.patch +qgtk-env.patch diff --git a/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix b/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix index 95cd6fea79b..1c10535c785 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtconnectivity.nix @@ -3,4 +3,8 @@ qtSubmodule { name = "qtconnectivity"; qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix index acddbd9e365..cc665334885 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix @@ -1,4 +1,4 @@ -{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }: +{ stdenv, qtSubmodule, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }: with stdenv.lib; @@ -6,13 +6,15 @@ qtSubmodule { name = "qtdeclarative"; patches = copyPathsToStore (readPathsFromFile ./. ./series); qtInputs = [ qtbase qtsvg qtxmlpatterns ]; - nativeBuildInputs = [ python2 makeQtWrapper ]; + nativeBuildInputs = [ python2 ]; + outputs = [ "out" "dev" "bin" ]; + + preConfigure = '' + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\"" + ''; postInstall = '' - wrapQtProgram $out/bin/qmleasing - wrapQtProgram $out/bin/qmlscene - wrapQtProgram $out/bin/qmltestrunner - '' + optionalString (stdenv.isDarwin) '' - wrapQtProgram $out/bin/qml.app/Contents/MacOS/qml + moveToOutput "$qtPluginPrefix" "$bin" + moveToOutput "$qtQmlPrefix" "$bin" ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch new file mode 100644 index 00000000000..d50ee823a78 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch @@ -0,0 +1,20 @@ +Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp +=================================================================== +--- qtdeclarative-opensource-src-5.8.0.orig/src/qml/qml/qqmlimport.cpp ++++ qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp +@@ -1630,6 +1630,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch deleted file mode 100644 index 06b244b974f..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp -=================================================================== ---- qtdeclarative-opensource-src-5.5.1.orig/src/qml/qml/qqmlimport.cpp -+++ qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp -@@ -1549,6 +1549,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); - addImportPath(installImportsPath); - -+ // Add library paths derived from NIX_PROFILES. -+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); -+ const QString qmldir = QString::fromLatin1("/lib/qt5/qml"); -+ Q_FOREACH (const QByteArray &profile, profiles) { -+ if (!profile.isEmpty()) { -+ addImportPath(QFile::decodeName(profile) + qmldir); -+ } -+ } -+ - // env import paths - QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); - if (!envImportPath.isEmpty()) { diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series index 7dbe197c56e..38abb916a50 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series +++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series @@ -1 +1 @@ -nix-profiles-import-paths.patch +import-paths.patch diff --git a/pkgs/development/libraries/qt-5/5.8/qtdoc.nix b/pkgs/development/libraries/qt-5/5.8/qtdoc.nix index 578ea6ba0b2..7f979ee94c0 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtdoc.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtdoc.nix @@ -3,4 +3,5 @@ qtSubmodule { name = "qtdoc"; qtInputs = [ qtdeclarative ]; + outputs = [ "out" ]; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtlocation.nix b/pkgs/development/libraries/qt-5/5.8/qtlocation.nix index 1e134057c4b..0eabe04e478 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtlocation.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtlocation.nix @@ -3,4 +3,9 @@ qtSubmodule { name = "qtlocation"; qtInputs = [ qtbase qtmultimedia ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtPluginPrefix" "$bin" + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix b/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix index 1c2dcc90d41..e133256e900 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix @@ -10,6 +10,11 @@ qtSubmodule { qtInputs = [ qtbase qtdeclarative ]; buildInputs = [ pkgconfig gstreamer gst-plugins-base libpulseaudio] ++ optional (stdenv.isLinux) alsaLib; + outputs = [ "out" "dev" "bin" ]; qmakeFlags = [ "GST_VERSION=1.0" ]; NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc"; + postInstall = '' + moveToOutput "$qtPluginPrefix" "$bin" + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix index 19750f2fd99..1a52d1802ce 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtquickcontrols2.nix @@ -3,4 +3,8 @@ qtSubmodule { name = "qtquickcontrols2"; qtInputs = [ qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix b/pkgs/development/libraries/qt-5/5.8/qtsensors.nix index 7bb18f56fe2..75829d3f0aa 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtsensors.nix @@ -5,4 +5,9 @@ with stdenv.lib; qtSubmodule { name = "qtsensors"; qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtPluginPrefix" "$bin" + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/0001-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.8/qtserialport/0001-dlopen-serialport-udev.patch deleted file mode 100644 index 3a813dc8007..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtserialport/0001-dlopen-serialport-udev.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d81c2c870b9bea8fb8e6b85baefb06542f568338 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sun, 23 Aug 2015 09:16:02 -0500 -Subject: [PATCH] dlopen serialport udev - ---- - src/serialport/qtudev_p.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h -index 6f2cabd..81b9849 100644 ---- a/src/serialport/qtudev_p.h -+++ b/src/serialport/qtudev_p.h -@@ -105,9 +105,9 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN - inline bool resolveSymbols(QLibrary *udevLibrary) - { - if (!udevLibrary->isLoaded()) { -- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); - if (!udevLibrary->load()) { -- udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); - if (!udevLibrary->load()) { - qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); - return false; --- -2.5.0 - diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix index 1fde2c2bd18..925e8a808f2 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix @@ -1,14 +1,12 @@ -{ stdenv, qtSubmodule, qtbase, substituteAll, systemd }: +{ stdenv, qtSubmodule, lib, copyPathsToStore, qtbase, substituteAll, systemd }: -with stdenv.lib; +let inherit (lib) getLib optional; in qtSubmodule { name = "qtserialport"; qtInputs = [ qtbase ]; - patches = optionals (stdenv.isLinux) [ - (substituteAll { - src = ./0001-dlopen-serialport-udev.patch; - libudev = systemd.lib; - }) - ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + NIX_CFLAGS_COMPILE = + optional stdenv.isLinux + ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch new file mode 100644 index 00000000000..65bb64710eb --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtserialport/qtserialport-dlopen-udev.patch @@ -0,0 +1,22 @@ +Index: qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h +=================================================================== +--- qtserialport-opensource-src-5.8.0.orig/src/serialport/qtudev_p.h ++++ qtserialport-opensource-src-5.8.0/src/serialport/qtudev_p.h +@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QL + inline bool resolveSymbols(QLibrary *udevLibrary) + { + if (!udevLibrary->isLoaded()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); ++#endif + if (!udevLibrary->load()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); ++#endif + if (!udevLibrary->load()) { + qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); + return false; diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/series b/pkgs/development/libraries/qt-5/5.8/qtserialport/series new file mode 100644 index 00000000000..83f4abf094e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtserialport/series @@ -0,0 +1 @@ +qtserialport-dlopen-udev.patch diff --git a/pkgs/development/libraries/qt-5/5.8/qtsvg.nix b/pkgs/development/libraries/qt-5/5.8/qtsvg.nix index b9ccac7cf93..0e21cf89340 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtsvg.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtsvg.nix @@ -3,4 +3,8 @@ qtSubmodule { name = "qtsvg"; qtInputs = [ qtbase ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtPluginPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix b/pkgs/development/libraries/qt-5/5.8/qttools/default.nix index 6b97c2d85cd..8c231271607 100644 --- a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qttools/default.nix @@ -1,28 +1,15 @@ -{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, qtbase }: +{ stdenv, qtSubmodule, copyPathsToStore, qtbase }: with stdenv.lib; qtSubmodule { name = "qttools"; qtInputs = [ qtbase ]; - nativeBuildInputs = [ makeQtWrapper ]; - + outputs = [ "out" "dev" "bin" ]; patches = copyPathsToStore (readPathsFromFile ./. ./series); + # qmake moves all binaries to $dev in preFixup postFixup = '' - moveToOutput "bin/qdbus" "$out" - moveToOutput "bin/qtpaths" "$out" - ''; - - postInstall = '' - wrapQtProgram $out/bin/qcollectiongenerator - wrapQtProgram $out/bin/qhelpconverter - wrapQtProgram $out/bin/qhelpgenerator - wrapQtProgram $out/bin/qtdiag - '' + optionalString (stdenv.isDarwin) '' - wrapQtProgram $out/bin/Assistant.app/Contents/MacOS/Assistant - wrapQtProgram $out/bin/Designer.app/Contents/MacOS/Designer - wrapQtProgram $out/bin/Linguist.app/Contents/MacOS/Linguist - wrapQtProgram $out/bin/pixeltool.app/Contents/MacOS/pixeltool - wrapQtProgram $out/bin/qdbusviewer.app/Contents/MacOS/qdbusviewer + moveToOutput "bin/qdbus" "$bin" + moveToOutput "bin/qtpaths" "$bin" ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtwayland.nix b/pkgs/development/libraries/qt-5/5.8/qtwayland.nix index 6d887f7c650..7b7bd2f6ebc 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwayland.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwayland.nix @@ -5,4 +5,9 @@ qtSubmodule { qtInputs = [ qtbase qtquickcontrols ]; buildInputs = [ wayland ]; nativeBuildInputs = [ pkgconfig ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtPluginPrefix" "$bin" + moveToOutput "$qtQmlPrefix "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix b/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix index fd7a3c52026..50a539dbe72 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwebchannel.nix @@ -3,5 +3,9 @@ qtSubmodule { name = "qtwebchannel"; qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix index 37f12eed758..871fb21c106 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix @@ -25,6 +25,7 @@ qtSubmodule { buildInputs = [ bison flex git which gperf ]; nativeBuildInputs = [ pkgconfig python2 coreutils ]; doCheck = true; + outputs = [ "out" "dev" "bin" ]; enableParallelBuilding = true; @@ -90,5 +91,7 @@ qtSubmodule { EOF paxmark m $out/libexec/QtWebEngineProcess + + moveToOutput "$qtQmlPrefix" "$bin" ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0001-dlopen-webkit-nsplugin.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/0001-dlopen-webkit-nsplugin.patch deleted file mode 100644 index 0eeacce1bc0..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0001-dlopen-webkit-nsplugin.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 862ce7d357a3ec32683ac6ec7c0ebdc9346b44ba Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sun, 23 Aug 2015 09:18:54 -0500 -Subject: [PATCH 1/3] dlopen webkit nsplugin - ---- - Source/WebCore/plugins/qt/PluginPackageQt.cpp | 2 +- - Source/WebCore/plugins/qt/PluginViewQt.cpp | 2 +- - Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp -index a923d49..2731d05 100644 ---- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp -+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp -@@ -136,7 +136,7 @@ static void initializeGtk(QLibrary* module = 0) - } - } - -- QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); -+ QLibrary library(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); - if (library.load()) { - typedef void *(*gtk_init_check_ptr)(int*, char***); - gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); -diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp -index de06a2f..363bde5 100644 ---- a/Source/WebCore/plugins/qt/PluginViewQt.cpp -+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp -@@ -697,7 +697,7 @@ static Display *getPluginDisplay() - // support gdk based plugins (like flash) that use a different X connection. - // The code below has the same effect as this one: - // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); -- QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); -+ QLibrary library(QLatin1String("@gdk_pixbuf@/lib/libgdk-x11-2.0"), 0); - if (!library.load()) - return 0; - -diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp -index d734ff6..62a2197 100644 ---- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp -+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp -@@ -64,7 +64,7 @@ static Display* getPluginDisplay() - // The code below has the same effect as this one: - // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); - -- QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); -+ QLibrary library(QLatin1String("@gdk_pixbuf@/libgdk-x11-2.0"), 0); - if (!library.load()) - return 0; - --- -2.5.0 - diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0002-dlopen-webkit-gtk.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/0002-dlopen-webkit-gtk.patch deleted file mode 100644 index bb5d1f74364..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0002-dlopen-webkit-gtk.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6a407d30357c2551abceac75c82f4a1688e47437 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sun, 23 Aug 2015 09:19:16 -0500 -Subject: [PATCH 2/3] dlopen webkit gtk - ---- - Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp -index 8de6521..0b25748 100644 ---- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp -+++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp -@@ -53,7 +53,7 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr - - static bool initializeGtk() - { -- QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); -+ QLibrary gtkLibrary(QLatin1String("@gtk@/lib/libgtk-x11-2.0"), 0); - if (!gtkLibrary.load()) - return false; - typedef void* (*gtk_init_ptr)(void*, void*); --- -2.5.0 - diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0003-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/0003-dlopen-webkit-udev.patch deleted file mode 100644 index 1c360cd81aa..00000000000 --- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/0003-dlopen-webkit-udev.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 864020dd47c3b6d532d9f26b82185904cf9324f2 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sun, 23 Aug 2015 09:19:29 -0500 -Subject: [PATCH 3/3] dlopen webkit udev - ---- - Source/WebCore/platform/qt/GamepadsQt.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Source/WebCore/platform/qt/GamepadsQt.cpp b/Source/WebCore/platform/qt/GamepadsQt.cpp -index 60ff317..da8ac69 100644 ---- a/Source/WebCore/platform/qt/GamepadsQt.cpp -+++ b/Source/WebCore/platform/qt/GamepadsQt.cpp -@@ -111,12 +111,12 @@ private: - bool load() - { - m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); -- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); - m_loaded = m_libUdev.load(); - if (resolveMethods()) - return true; - -- m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); - m_loaded = m_libUdev.load(); - return resolveMethods(); - } --- -2.5.0 - diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix index bee3786ef32..664281aac31 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwebkit/default.nix @@ -1,4 +1,5 @@ -{ qtSubmodule, stdenv, qtdeclarative, qtlocation, qtsensors +{ qtSubmodule, stdenv, copyPathsToStore, lib +, qtdeclarative, qtlocation, qtsensors , fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt , sqlite, systemd, glib, gst_all_1 , bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby @@ -7,7 +8,7 @@ , flashplayerFix ? false }: -with stdenv.lib; +let inherit (lib) optional optionals getLib; in qtSubmodule { name = "qtwebkit"; @@ -22,23 +23,15 @@ qtSubmodule { "/usr/lib/libicucore.dylib" ]; - patches = - let dlopen-webkit-nsplugin = substituteAll { - src = ./0001-dlopen-webkit-nsplugin.patch; - gtk = gtk2.out; - gdk_pixbuf = gdk_pixbuf.out; - }; - dlopen-webkit-gtk = substituteAll { - src = ./0002-dlopen-webkit-gtk.patch; - gtk = gtk2.out; - }; - dlopen-webkit-udev = substituteAll { - src = ./0003-dlopen-webkit-udev.patch; - libudev = systemd.lib; - }; - in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] - ++ optionals (!stdenv.isDarwin) [ dlopen-webkit-udev ] - ++ optionals (stdenv.isDarwin) [ ./0004-icucore-darwin.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + + NIX_CFLAGS_COMPILE = + optionals flashplayerFix + [ + ''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"'' + ''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"'' + ] + ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; # Hack to avoid TMPDIR in RPATHs. preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch new file mode 100644 index 00000000000..e34eda592af --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-gtk.patch @@ -0,0 +1,64 @@ +Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginPackageQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginPackageQt.cpp +@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* modu + } + } + ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary library(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (library.load()) { + typedef void *(*gtk_init_check_ptr)(int*, char***); + gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check"); +Index: qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebCore/plugins/qt/PluginViewQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebCore/plugins/qt/PluginViewQt.cpp +@@ -697,7 +697,11 @@ static Display *getPluginDisplay() + // support gdk based plugins (like flash) that use a different X connection. + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + +Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp +@@ -64,7 +64,11 @@ static Display* getPluginDisplay() + // The code below has the same effect as this one: + // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); + ++#ifdef NIXPKGS_LIBGDK2 ++ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0); ++#else + QLibrary library(QLatin1String("libgdk-x11-2.0"), 0); ++#endif + if (!library.load()) + return 0; + +Index: qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp ++++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp +@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType typ + + static bool initializeGtk() + { ++#ifdef NIXPKGS_LIBGTK2 ++ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0); ++#else + QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0); ++#endif + if (!gtkLibrary.load()) + return false; + typedef void* (*gtk_init_ptr)(void*, void*); diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-dlopen-udev.patch new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch b/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch new file mode 100644 index 00000000000..63c653da94e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtwebkit/qtwebkit-icucore-darwin.patch @@ -0,0 +1,13 @@ +Index: qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri +=================================================================== +--- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri ++++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri +@@ -12,7 +12,7 @@ mac { + # Mac OS does ship libicu but not the associated header files. + # Therefore WebKit provides adequate header files. + INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH +- LIBS += -licucore ++ LIBS += /usr/lib/libicucore.dylib + } else:!use?(wchar_unicode): { + win32 { + CONFIG(static, static|shared) { diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebkit/series b/pkgs/development/libraries/qt-5/5.8/qtwebkit/series new file mode 100644 index 00000000000..140e2a3dd4e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtwebkit/series @@ -0,0 +1,3 @@ +qtwebkit-dlopen-gtk.patch +qtwebkit-dlopen-udev.patch +qtwebkit-icucore-darwin.patch diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix b/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix index fbdfbbcf0db..925adce75a9 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwebsockets.nix @@ -3,4 +3,8 @@ qtSubmodule { name = "qtwebsockets"; qtInputs = [ qtbase qtdeclarative ]; + outputs = [ "out" "dev" "bin" ]; + postInstall = '' + moveToOutput "$qtQmlPrefix" "$bin" + ''; } diff --git a/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh deleted file mode 100644 index 576c03d8c76..00000000000 --- a/pkgs/development/libraries/qt-5/make-qt-wrapper-darwin.sh +++ /dev/null @@ -1,38 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --set DYLD_FRAMEWORK_PATH "/System/Library/Frameworks" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ - --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ - --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ - --set DYLD_FRAMEWORK_PATH "/System/Library/Frameworks" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - "$@" -} - -_makeQtWrapperSetup() { - # cannot use addToSearchPath because these directories may not exist yet - export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" - export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" - export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share" - export RUNTIME_XDG_CONFIG_DIRS="$RUNTIME_XDG_CONFIG_DIRS${RUNTIME_XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" -} - -prePhases+=(_makeQtWrapperSetup) diff --git a/pkgs/development/libraries/qt-5/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper.sh deleted file mode 100644 index 4a5651f74c9..00000000000 --- a/pkgs/development/libraries/qt-5/make-qt-wrapper.sh +++ /dev/null @@ -1,46 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \ - --prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \ - --prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - --prefix GIO_EXTRA_MODULES : "$GIO_EXTRA_MODULES" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \ - --prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \ - --prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \ - --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ - --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ - --prefix GIO_EXTRA_MODULES : "$GIO_EXTRA_MODULES" \ - "$@" -} - -_makeQtWrapperSetup() { - # cannot use addToSearchPath because these directories may not exist yet - export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" - export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" - export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share${GSETTINGS_SCHEMAS_PATH:+:$GSETTINGS_SCHEMAS_PATH}" - export RUNTIME_XDG_CONFIG_DIRS="$RUNTIME_XDG_CONFIG_DIRS${RUNTIME_XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" -} - -prePhases+=(_makeQtWrapperSetup) - -_findGioModules() { - if [ -d "$1"/lib/gio/modules ] && [ -n "$(ls -A $1/lib/gio/modules)" ] ; then - export GIO_EXTRA_MODULES="$GIO_EXTRA_MODULES${GIO_EXTRA_MODULES:+:}$1/lib/gio/modules" - fi -} - -envHooks+=(_findGioModules) diff --git a/pkgs/development/libraries/qt-5/qmake-hook-darwin.sh b/pkgs/development/libraries/qt-5/qmake-hook-darwin.sh deleted file mode 100644 index c359cb4ee6a..00000000000 --- a/pkgs/development/libraries/qt-5/qmake-hook-darwin.sh +++ /dev/null @@ -1,42 +0,0 @@ -qmakeConfigurePhase() { - runHook preConfigure - - qmake PREFIX=$out $qmakeFlags - - runHook postConfigure -} - -if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then - configurePhase=qmakeConfigurePhase -fi - -_qtModuleMultioutDevsPre() { - # We cannot simply set these paths in configureFlags because libQtCore retains - # references to the paths it was built with. - moveToOutput "bin" "${!outputDev}" - moveToOutput "include" "${!outputDev}" - - # The destination directory must exist or moveToOutput will do nothing - mkdir -p "${!outputDev}/share" - moveToOutput "share/doc" "${!outputDev}" -} - -_qtModuleMultioutDevsPost() { - # Move libtool archives and qmake project files to $dev/lib - if [ "z${!outputLib}" != "z${!outputDev}" ]; then - pushd "${!outputLib}" - if [ -d "lib" ]; then - find lib \( -name '*.a' -o -name '*.la' \) -print0 | \ - while read -r -d $'\0' file; do - mkdir -p "${!outputDev}/$(dirname "$file")" - mv "${!outputLib}/$file" "${!outputDev}/$file" - done - fi - popd - fi -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - preFixupHooks+=(_qtModuleMultioutDevsPre) - postFixupHooks+=(_qtModuleMultioutDevsPost) -fi diff --git a/pkgs/development/libraries/qt-5/qmake-hook.sh b/pkgs/development/libraries/qt-5/qmake-hook.sh index 696b4ea8dad..c70410975ec 100644 --- a/pkgs/development/libraries/qt-5/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/qmake-hook.sh @@ -22,11 +22,16 @@ _qtModuleMultioutDevsPre() { } _qtModuleMultioutDevsPost() { + local -a findopts=(-name '*.a' -o -name '*.la') + if [ -z "@isDarwin@" ]; then + findopts+=(-o -name '*.prl') + fi + # Move libtool archives and qmake project files to $dev/lib if [ "z${!outputLib}" != "z${!outputDev}" ]; then pushd "${!outputLib}" if [ -d "lib" ]; then - find lib \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | \ + find lib \( "${findopts[@]}" \) -print0 | \ while read -r -d $'\0' file; do mkdir -p "${!outputDev}/$(dirname "$file")" mv "${!outputLib}/$file" "${!outputDev}/$file" diff --git a/pkgs/development/libraries/qt-5/qt-env.nix b/pkgs/development/libraries/qt-5/qt-env.nix index fad68fbd745..728761689b4 100644 --- a/pkgs/development/libraries/qt-5/qt-env.nix +++ b/pkgs/development/libraries/qt-5/qt-env.nix @@ -13,10 +13,9 @@ buildEnv { cat >"$out/bin/qt.conf" <"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" diff --git a/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh index 47d196cec26..e7752af4397 100644 --- a/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-5/qtbase-setup-hook.sh @@ -1,71 +1,55 @@ -addToSearchPathOnceWithCustomDelimiter() { - local delim="$1" - local search="$2" - local target="$3" - local dirs - local exported - IFS="$delim" read -a dirs <<< "${!search}" - local canonical - if canonical=$(readlink -e "$target"); then - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$canonical" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" +qtPluginPrefix=@qtPluginPrefix@ +qtQmlPrefix=@qtQmlPrefix@ +qtDocPrefix=@qtDocPrefix@ + +NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" +NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" + +providesQtRuntime() { + [ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ] +} + +# Propagate any runtime dependency of the building package. +# Each dependency is propagated to the user environment and as a build +# input so that it will be re-propagated to the user environment by any +# package depending on the building package. (This is necessary in case +# the building package does not provide runtime dependencies itself and so +# would not be propagated to the user environment.) +_qtCrossEnvHook() { + if providesQtRuntime "$1"; then + propagatedBuildInputs+=" $1" + propagatedUserEnvPkgs+=" $1" + fi +} +if [ -z "$NIX_QT5_TMP" ]; then + crossEnvHooks+=(_qtCrossEnvHook) +fi + +_qtEnvHook() { + if providesQtRuntime "$1"; then + propagatedNativeBuildInputs+=" $1" + if [ -z "$crossConfig" ]; then + propagatedUserEnvPkgs+=" $1" fi fi } +if [ -z "$NIX_QT5_TMP" ]; then + envHooks+=(_qtEnvHook) +fi -addToSearchPathOnce() { - addToSearchPathOnceWithCustomDelimiter ':' "$@" -} - -propagateOnce() { - addToSearchPathOnceWithCustomDelimiter ' ' "$@" -} - -_qtPropagate() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedBuildInputs "$1" - break - fi - done - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" -} - -crossEnvHooks+=(_qtPropagate) - -_qtPropagateNative() { - for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do - if [ -d "$1/$dir" ]; then - propagateOnce propagatedNativeBuildInputs "$1" - break - fi - done - if [ -z "$crossConfig" ]; then - addToSearchPathOnce QT_PLUGIN_PATH "$1/lib/qt5/plugins" - addToSearchPathOnce QML_IMPORT_PATH "$1/lib/qt5/imports" - addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml" - fi -} - -envHooks+=(_qtPropagateNative) - -_qtMultioutDevs() { - # This is necessary whether the package is a Qt module or not +_qtPreFixupHook() { moveToOutput "mkspecs" "${!outputDev}" } +if [ -z "$NIX_QT5_TMP" ]; then + preFixupHooks+=(_qtPreFixupHook) +fi -preFixupHooks+=(_qtMultioutDevs) - -_qtSetCMakePrefix() { - export CMAKE_PREFIX_PATH="$NIX_QT5_TMP${CMAKE_PREFIX_PATH:+:}${CMAKE_PREFIX_PATH}" -} - -_qtRmTmp() { +_qtPostInstallHook() { + # Clean up temporary installation files created by this setup hook. + # For building Qt modules, this is necessary to prevent including + # dependencies in the output. For all other packages, this is necessary + # to induce patchelf to remove the temporary paths from the RPATH of + # dynamically-linked objects. if [ -z "$NIX_QT_SUBMODULE" ]; then rm -fr "$NIX_QT5_TMP" else @@ -83,11 +67,52 @@ _qtRmTmp() { rm "$NIX_QT5_TMP/nix-support/qt-inputs" fi + + # Patch CMake modules + if [ -n "$NIX_QT_SUBMODULE" ]; then + find "${!outputLib}" -name "*.cmake" | while read file; do + substituteInPlace "$file" \ + --subst-var-by NIX_OUT "${!outputLib}" \ + --subst-var-by NIX_DEV "${!outputDev}" \ + --subst-var-by NIX_BIN "${!outputBin}" + done + fi +} +if [ -z "$NIX_QT5_TMP" ]; then + preConfigureHooks+=(_qtPreConfigureHook) +fi + +_qtLinkModuleDir() { + if [ -d "$1/$2" ]; then + @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" + find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" + fi } -_qtSetQmakePath() { +_qtPreConfigureHook() { + # Find the temporary qmake executable first. + # This must run after all the environment hooks! export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH" + + # Link all runtime module dependencies into the temporary directory. + IFS=: read -a modules <<< $NIX_QT5_MODULES + for module in ${modules[@]}; do + _qtLinkModuleDir "$module" "lib" + done + + # Link all the build-time module dependencies into the temporary directory. + IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV + for module in ${modules[@]}; do + _qtLinkModuleDir "$module" "bin" + _qtLinkModuleDir "$module" "include" + _qtLinkModuleDir "$module" "lib" + _qtLinkModuleDir "$module" "mkspecs" + _qtLinkModuleDir "$module" "share" + done } +if [ -z "$NIX_QT5_TMP" ]; then + postInstallHooks+=(_qtPostInstallHook) +fi if [ -z "$NIX_QT5_TMP" ]; then if [ -z "$NIX_QT_SUBMODULE" ]; then @@ -95,7 +120,6 @@ if [ -z "$NIX_QT5_TMP" ]; then else NIX_QT5_TMP=$out fi - postInstallHooks+=(_qtRmTmp) mkdir -p "$NIX_QT5_TMP/nix-support" for subdir in bin include lib mkspecs share; do @@ -103,64 +127,18 @@ if [ -z "$NIX_QT5_TMP" ]; then echo "$subdir/" >> "$NIX_QT5_TMP/nix-support/qt-inputs" done - postHooks+=(_qtSetCMakePrefix) - cp "@dev@/bin/qmake" "$NIX_QT5_TMP/bin" echo "bin/qmake" >> "$NIX_QT5_TMP/nix-support/qt-inputs" cat >"$NIX_QT5_TMP/bin/qt.conf" <> "$NIX_QT5_TMP/nix-support/qt-inputs" export QMAKE="$NIX_QT5_TMP/bin/qmake" - - # Set PATH to find qmake first in a preConfigure hook - # It must run after all the envHooks! - preConfigureHooks+=(_qtSetQmakePath) fi -qt5LinkModuleDir() { - if [ -d "$1/$2" ]; then - @lndir@/bin/lndir -silent "$1/$2" "$NIX_QT5_TMP/$2" - find "$1/$2" -printf "$2/%P\n" >> "$NIX_QT5_TMP/nix-support/qt-inputs" - fi -} - -NIX_QT5_MODULES="${NIX_QT5_MODULES}${NIX_QT5_MODULES:+:}@out@" -NIX_QT5_MODULES_DEV="${NIX_QT5_MODULES_DEV}${NIX_QT5_MODULES_DEV:+:}@dev@" - -_qtLinkAllModules() { - IFS=: read -a modules <<< $NIX_QT5_MODULES - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "lib" - done - - IFS=: read -a modules <<< $NIX_QT5_MODULES_DEV - for module in ${modules[@]}; do - qt5LinkModuleDir "$module" "bin" - qt5LinkModuleDir "$module" "include" - qt5LinkModuleDir "$module" "lib" - qt5LinkModuleDir "$module" "mkspecs" - qt5LinkModuleDir "$module" "share" - done -} - -preConfigureHooks+=(_qtLinkAllModules) - -_qtFixCMakePaths() { - find "${!outputLib}" -name "*.cmake" | while read file; do - substituteInPlace "$file" \ - --subst-var-by NIX_OUT "${!outputLib}" \ - --subst-var-by NIX_DEV "${!outputDev}" - done -} - -if [ -n "$NIX_QT_SUBMODULE" ]; then - postInstallHooks+=(_qtFixCMakePaths) -fi diff --git a/pkgs/development/libraries/qtinstaller/default.nix b/pkgs/development/libraries/qtinstaller/default.nix index 3379cbc9acf..2fc8a894056 100644 --- a/pkgs/development/libraries/qtinstaller/default.nix +++ b/pkgs/development/libraries/qtinstaller/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, qtdeclarative , qttools, qtbase, qmakeHook }: +{ stdenv, fetchurl, qtdeclarative , qttools, qtbase, qmake }: stdenv.mkDerivation rec { name = "qtinstaller"; - propagatedBuildInputs = [qtdeclarative qttools]; - nativeBuildInputs = [ qmakeHook ]; + propagatedBuildInputs = [ qtdeclarative qttools ]; + nativeBuildInputs = [ qmake ]; version = "2.0.3"; src = fetchurl { diff --git a/pkgs/development/libraries/qtstyleplugins/default.nix b/pkgs/development/libraries/qtstyleplugins/default.nix index dc27e2034f1..1be83731f20 100644 --- a/pkgs/development/libraries/qtstyleplugins/default.nix +++ b/pkgs/development/libraries/qtstyleplugins/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qmakeHook, qtbase, pkgconfig, gtk2 }: +{ stdenv, fetchFromGitHub, qmake, qtbase, pkgconfig, gtk2 }: stdenv.mkDerivation rec { name = "qtstyleplugins-2017-03-11"; @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { sha256 = "085wyn85nrmzr8nv5zv7fi2kqf8rp1gnd30h72s30j55xvhmxvmy"; }; - buildInputs = [ qmakeHook pkgconfig gtk2 ]; + nativeBuildInputs = [ pkgconfig qmake ]; + buildInputs = [ gtk2 ]; installPhase = '' make INSTALL_ROOT=$NIX_QT5_TMP install diff --git a/pkgs/development/libraries/qtwebkit-plugins/default.nix b/pkgs/development/libraries/qtwebkit-plugins/default.nix index 73e62945113..201eb4e7ec9 100644 --- a/pkgs/development/libraries/qtwebkit-plugins/default.nix +++ b/pkgs/development/libraries/qtwebkit-plugins/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qmakeHook, qtwebkit, hunspell }: +{ stdenv, fetchFromGitHub, qmake, qtwebkit, hunspell }: stdenv.mkDerivation { name = "qtwebkit-plugins-2015-05-09"; @@ -10,13 +10,13 @@ stdenv.mkDerivation { sha256 = "0xyq25l56jgdxgqqv0380brhw9gg0hin5hyrf1j6d3c8k1gka20m"; }; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ qtwebkit hunspell ]; postPatch = '' sed -i "s,-lhunspell,-lhunspell-1.6," src/spellcheck/spellcheck.pri - sed -i "s,\$\$\[QT_INSTALL_PLUGINS\],$out/lib/qt5/plugins," src/src.pro + sed -i "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix," src/src.pro ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/quazip/default.nix b/pkgs/development/libraries/quazip/default.nix index 7fbbf27c8eb..4379f5cf667 100644 --- a/pkgs/development/libraries/quazip/default.nix +++ b/pkgs/development/libraries/quazip/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, zip, zlib, qtbase, qmakeHook }: +{ fetchurl, stdenv, zip, zlib, qtbase, qmake }: stdenv.mkDerivation rec { name = "quazip-0.7.1"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { preConfigure = "cd quazip"; buildInputs = [ zlib qtbase ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; meta = { description = "Provides access to ZIP archives from Qt programs"; diff --git a/pkgs/development/libraries/qwt/6.nix b/pkgs/development/libraries/qwt/6.nix index cd940b818e9..314ab0f9e61 100644 --- a/pkgs/development/libraries/qwt/6.nix +++ b/pkgs/development/libraries/qwt/6.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qtsvg, qttools, qmakeHook }: +{ stdenv, fetchurl, qtbase, qtsvg, qttools, qmake }: stdenv.mkDerivation rec { name = "qwt-6.1.2"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ qtbase qtsvg qttools ]; - nativeBuildInputs = [ qmakeHook ]; + nativeBuildInputs = [ qmake ]; postPatch = '' sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 880edfbab07..5d98544da88 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -1,5 +1,5 @@ { lib, fetchurl, pythonPackages, pkgconfig, qtbase, qtsvg, qtwebkit, qtwebengine, dbus_libs -, lndir, makeWrapper, qmakeHook }: +, lndir, makeWrapper, qmake }: let version = "5.8.1"; @@ -21,9 +21,10 @@ in buildPythonPackage { sha256 = "0biak7l574i2gc8lj1s45skajbxsmmx66nlvs6xaakzkc6r293qy"; }; + nativeBuildInputs = [ pkgconfig makeWrapper qmake ]; + buildInputs = [ - pkgconfig makeWrapper lndir - qtbase qtsvg qtwebkit qtwebengine dbus_libs qmakeHook + lndir qtbase qtsvg qtwebkit qtwebengine dbus_libs ]; propagatedBuildInputs = [ sip ]; diff --git a/pkgs/development/qtcreator/default.nix b/pkgs/development/qtcreator/default.nix index 6fadf530ed0..ff4341c6783 100644 --- a/pkgs/development/qtcreator/default.nix +++ b/pkgs/development/qtcreator/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, makeWrapper -, qtbase, makeQtWrapper, qtquickcontrols, qtscript, qtdeclarative, qmakeHook +, qtbase, qtquickcontrols, qtscript, qtdeclarative, qmake , withDocumentation ? false }: @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative ]; - nativeBuildInputs = [ qmakeHook makeQtWrapper makeWrapper ]; + nativeBuildInputs = [ qmake makeWrapper ]; doCheck = true; @@ -32,13 +32,12 @@ stdenv.mkDerivation rec { installFlags = [ "INSTALL_ROOT=$(out)" ] ++ optional withDocumentation "install_docs"; preBuild = optional withDocumentation '' - ln -s ${qtbase}/share/doc $NIX_QT5_TMP/share + ln -s ${qtbase}/$qtDocPrefix $NIX_QT5_TMP/share ''; postInstall = '' substituteInPlace $out/share/applications/org.qt-project.qtcreator.desktop \ --replace "Exec=qtcreator" "Exec=$out/bin/qtcreator" - wrapQtProgram $out/bin/qtcreator ''; meta = { diff --git a/pkgs/development/tools/analysis/qcachegrind/default.nix b/pkgs/development/tools/analysis/qcachegrind/default.nix index 64bb39aaf45..395f720906c 100644 --- a/pkgs/development/tools/analysis/qcachegrind/default.nix +++ b/pkgs/development/tools/analysis/qcachegrind/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, qmakeHook, makeQtWrapper, qtbase, perl, python, php }: +{ stdenv, fetchurl, cmake, qmake, qtbase, perl, python, php }: stdenv.mkDerivation rec { name = "qcachegrind-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { buildInputs = [ qtbase perl python php ]; - nativeBuildInputs = [ qmakeHook makeQtWrapper ]; + nativeBuildInputs = [ qmake ]; postInstall = '' mkdir -p $out/bin @@ -25,10 +25,8 @@ stdenv.mkDerivation rec { mkdir -p $out/Applications cp cgview/cgview.app/Contents/MacOS/cgview $out/bin cp -a qcachegrind/qcachegrind.app $out/Applications - wrapQtProgram $out/Applications/qcachegrind.app/Contents/MacOS/qcachegrind '' else '' install qcachegrind/qcachegrind cgview/cgview -t "$out/bin" - wrapQtProgram "$out/bin/qcachegrind" install -Dm644 qcachegrind/qcachegrind.desktop -t "$out/share/applications" install -Dm644 kcachegrind/hi32-app-kcachegrind.png "$out/share/icons/hicolor/32x32/apps/kcachegrind.png" install -Dm644 kcachegrind/hi48-app-kcachegrind.png "$out/share/icons/hicolor/48x48/apps/kcachegrind.png" diff --git a/pkgs/development/tools/database/sqlitebrowser/default.nix b/pkgs/development/tools/database/sqlitebrowser/default.nix index 28c618c29a0..a43d3928980 100644 --- a/pkgs/development/tools/database/sqlitebrowser/default.nix +++ b/pkgs/development/tools/database/sqlitebrowser/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchFromGitHub, qtbase, qttools, makeQtWrapper, sqlite, cmake }: +{ mkDerivation, lib, fetchFromGitHub, qtbase, qttools, sqlite, cmake }: -stdenv.mkDerivation rec { +mkDerivation rec { version = "3.9.1"; name = "sqlitebrowser-${version}"; @@ -12,23 +12,17 @@ stdenv.mkDerivation rec { }; buildInputs = [ qtbase qttools sqlite ]; - nativeBuildInputs = [ makeQtWrapper cmake ]; - - enableParallelBuilding = true; - + nativeBuildInputs = [ cmake ]; + cmakeFlags = [ "-DUSE_QT5=TRUE" ]; - + # A regression was introduced in CMakeLists.txt on v3.9.x # See https://github.com/sqlitebrowser/sqlitebrowser/issues/832 and issues/755 postPatch = '' substituteInPlace CMakeLists.txt --replace 'project("DB Browser for SQLite")' 'project(sqlitebrowser)' ''; - postInstall = '' - wrapQtProgram $out/bin/sqlitebrowser - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "DB Browser for SQLite"; homepage = "http://sqlitebrowser.org/"; license = licenses.gpl3; diff --git a/pkgs/development/tools/tora/default.nix b/pkgs/development/tools/tora/default.nix index 350cda4e263..578e759548a 100644 --- a/pkgs/development/tools/tora/default.nix +++ b/pkgs/development/tools/tora/default.nix @@ -1,10 +1,10 @@ -{ stdenv, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeQtWrapper +{ mkDerivation, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeWrapper , boost, doxygen, openssl, mysql, postgresql, graphviz, loki, qscintilla, qtbase }: let qscintillaLib = (qscintilla.override { withQt5 = true; }); -in stdenv.mkDerivation rec { +in mkDerivation rec { name = "tora-${version}"; version = "3.1"; @@ -15,10 +15,8 @@ in stdenv.mkDerivation rec { sha256 = "0wninl10bcgiljf6wnhn2rv8kmzryw78x5qvbw8s2zfjlnxjsbn7"; }; - enableParallelBuilding = true; - + nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ]; buildInputs = [ - cmake extra-cmake-modules makeQtWrapper boost doxygen graphviz loki mysql openssl postgresql qscintillaLib qtbase ]; @@ -54,11 +52,11 @@ in stdenv.mkDerivation rec { ]; postFixup = '' - wrapQtProgram $out/bin/tora \ + wrapProgram $out/bin/tora \ --prefix PATH : ${lib.getBin graphviz}/bin ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Tora SQL tool"; maintainers = with maintainers; [ peterhoeg ]; platforms = platforms.linux; diff --git a/pkgs/development/tools/vogl/default.nix b/pkgs/development/tools/vogl/default.nix index 56f15d62154..e351a75db4b 100644 --- a/pkgs/development/tools/vogl/default.nix +++ b/pkgs/development/tools/vogl/default.nix @@ -1,11 +1,12 @@ -{ fetchFromGitHub, stdenv +{ mkDerivation, lib, fetchFromGitHub , cmake, git, pkgconfig, wget, zip -, makeQtWrapper, qtbase, qtx11extras +, qtbase, qtx11extras , libdwarf, libjpeg_turbo, libunwind, lzma, tinyxml, libX11 , SDL2, SDL2_gfx, SDL2_image, SDL2_ttf , freeglut, mesa_glu }: -stdenv.mkDerivation rec { + +mkDerivation rec { name = "vogl-${version}"; version = "2016-05-13"; @@ -16,9 +17,7 @@ stdenv.mkDerivation rec { sha256 = "17gwd73x3lnqv6ccqs48pzqwbzjhbn41c0x0l5zzirhiirb3yh0n"; }; - nativeBuildInputs = [ - cmake makeQtWrapper pkgconfig - ]; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ git wget zip @@ -28,16 +27,17 @@ stdenv.mkDerivation rec { freeglut mesa_glu ]; - enableParallelBuilding = true; - dontUseCmakeBuildDir = true; preConfigure = '' cmakeDir=$PWD mkdir -p vogl/vogl_build/release64 && cd $_ ''; - cmakeFlags = '' -DCMAKE_VERBOSE=On -DCMAKE_BUILD_TYPE=Release -DBUILD_X64=On''; + cmakeFlags = [ + "-DCMAKE_VERBOSE=On" + "-DBUILD_X64=On" + ]; - meta = with stdenv.lib; { + meta = with lib; { description = "OpenGL capture / playback debugger."; homepage = https://github.com/ValveSoftware/vogl; license = licenses.mit; diff --git a/pkgs/games/chessx/default.nix b/pkgs/games/chessx/default.nix index f1dd86d67b9..e8daca26ef7 100644 --- a/pkgs/games/chessx/default.nix +++ b/pkgs/games/chessx/default.nix @@ -1,4 +1,4 @@ -{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmakeHook, fetchurl }: +{ stdenv, pkgconfig, zlib, qtbase, qtsvg, qttools, qtmultimedia, qmake, fetchurl }: stdenv.mkDerivation rec { name = "chessx-${version}"; version = "1.4.0"; @@ -7,15 +7,13 @@ stdenv.mkDerivation rec { sha256 = "1x10c9idj2qks8xk9dy7aw3alc5w7z1kvv6dnahs0428j0sp4a74"; }; buildInputs = [ - stdenv - pkgconfig qtbase qtsvg qttools qtmultimedia zlib - qmakeHook ]; + nativeBuildInputs = [ pkgconfig qmake ]; # RCC: Error in 'resources.qrc': Cannot find file 'i18n/chessx_da.qm' #enableParallelBuilding = true; diff --git a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix index 57610fb1c1c..5be8c7d759e 100644 --- a/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix +++ b/pkgs/games/dwarf-fortress/dwarf-therapist/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, coreutils, qtbase, qtdeclarative, qmakeHook, texlive }: +{ stdenv, fetchFromGitHub, coreutils, qtbase, qtdeclarative, qmake, texlive }: stdenv.mkDerivation rec { name = "dwarf-therapist-original-${version}"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "layouts" ]; buildInputs = [ qtbase qtdeclarative ]; - nativeBuildInputs = [ texlive qmakeHook ]; + nativeBuildInputs = [ texlive qmake ]; enableParallelBuilding = false; diff --git a/pkgs/games/mudlet/default.nix b/pkgs/games/mudlet/default.nix index 99c06e56043..078075931da 100644 --- a/pkgs/games/mudlet/default.nix +++ b/pkgs/games/mudlet/default.nix @@ -1,5 +1,5 @@ { fetchurl, unzip, stdenv, makeWrapper, qtbase, yajl, libzip, hunspell -, boost, lua5_1, luafilesystem, luazip, lrexlib, luasqlite3, qmakeHook }: +, boost, lua5_1, luafilesystem, luazip, lrexlib, luasqlite3, qmake }: stdenv.mkDerivation rec { name = "mudlet-${version}"; @@ -10,9 +10,10 @@ stdenv.mkDerivation rec { sha256 = "08fhqd323kgz5s17ac5z9dhkjxcmwvcmvhzy0x1vw4rayhijfrd7"; }; + nativeBuildInputs = [ makeWrapper qmake ]; buildInputs = [ - unzip qtbase lua5_1 hunspell libzip yajl boost makeWrapper - luafilesystem luazip lrexlib luasqlite3 qmakeHook + unzip qtbase lua5_1 hunspell libzip yajl boost + luafilesystem luazip lrexlib luasqlite3 ]; preConfigure = "cd src"; diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index c0e065b3b55..622bf4fbd5c 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig, perl, makeQtWrapper +{ stdenv, lib, fetchurl, pkgconfig, perl , libjpeg, udev , withUtils ? true , withGUI ? true, alsaLib, libX11, qtbase, mesa_glu @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { ln -s "$dev/include/libv4l1-videodev.h" "$dev/include/videodev.h" ''; - nativeBuildInputs = [ pkgconfig perl ] ++ lib.optional (withUtils && withGUI) makeQtWrapper; + nativeBuildInputs = [ pkgconfig perl ]; buildInputs = [ udev ] ++ lib.optionals (withUtils && withGUI) [ alsaLib libX11 qtbase mesa_glu ]; @@ -41,10 +41,6 @@ stdenv.mkDerivation rec { patchShebangs . ''; - postInstall = lib.optionalString (withUtils && withGUI) '' - wrapQtProgram $out/bin/qv4l2 - ''; - meta = with stdenv.lib; { description = "V4L utils and libv4l, provide common image formats regardless of the v4l device"; homepage = http://linuxtv.org/projects.php; diff --git a/pkgs/os-specific/linux/wpa_supplicant/gui.nix b/pkgs/os-specific/linux/wpa_supplicant/gui.nix index d2bd6ff739f..06a38b29166 100644 --- a/pkgs/os-specific/linux/wpa_supplicant/gui.nix +++ b/pkgs/os-specific/linux/wpa_supplicant/gui.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qmakeHook, inkscape, imagemagick, wpa_supplicant }: +{ stdenv, fetchurl, qtbase, qmake, inkscape, imagemagick, wpa_supplicant }: stdenv.mkDerivation { name = "wpa_gui-${wpa_supplicant.version}"; @@ -6,7 +6,7 @@ stdenv.mkDerivation { inherit (wpa_supplicant) src; buildInputs = [ qtbase ]; - nativeBuildInputs = [ qmakeHook inkscape imagemagick ]; + nativeBuildInputs = [ qmake inkscape imagemagick ]; prePatch = '' cd wpa_supplicant/wpa_gui-qt4 diff --git a/pkgs/tools/audio/qastools/default.nix b/pkgs/tools/audio/qastools/default.nix index 3456f098648..d86a0b09c26 100644 --- a/pkgs/tools/audio/qastools/default.nix +++ b/pkgs/tools/audio/qastools/default.nix @@ -1,11 +1,10 @@ -{ stdenv, fetchurl, cmake, alsaLib, udev, qtbase, - qtsvg, qttools, makeQtWrapper }: +{ mkDerivation, lib, fetchurl, cmake, alsaLib, udev, qtbase, qtsvg, qttools }: let version = "0.21.0"; in -stdenv.mkDerivation { +mkDerivation { name = "qastools-${version}"; src = fetchurl { @@ -14,15 +13,15 @@ stdenv.mkDerivation { }; buildInputs = [ - cmake alsaLib udev qtbase qtsvg qttools makeQtWrapper + alsaLib udev qtbase qtsvg qttools ]; + nativeBuildInputs = [ cmake ]; cmakeFlags = [ - "-DCMAKE_INSALL_PREFIX=$out" "-DALSA_INCLUDE=${alsaLib.dev}/include/alsa/version.h" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Collection of desktop applications for ALSA configuration"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/tools/misc/antimicro/default.nix b/pkgs/tools/misc/antimicro/default.nix index 02d65597f74..ee0accac2d9 100644 --- a/pkgs/tools/misc/antimicro/default.nix +++ b/pkgs/tools/misc/antimicro/default.nix @@ -1,6 +1,6 @@ -{ stdenv, cmake, pkgconfig, SDL2, qtbase, qttools, makeQtWrapper, xorg, fetchFromGitHub }: +{ mkDerivation, lib, cmake, pkgconfig, SDL2, qtbase, qttools, xorg, fetchFromGitHub }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "antimicro-${version}"; version = "2.23"; @@ -11,15 +11,12 @@ stdenv.mkDerivation rec { sha256 = "1q40ayxwwyq85lc89cnj1cm2nar625h4vhh8dvmb2qcxczaggf4v"; }; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - cmake pkgconfig SDL2 qtbase qttools xorg.libXtst makeQtWrapper + SDL2 qtbase qttools xorg.libXtst ]; - postInstall = '' - wrapQtProgram $out/bin/antimicro - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "GUI for mapping keyboard and mouse controls to a gamepad"; inherit (src.meta) homepage; maintainers = with maintainers; [ jb55 ]; diff --git a/pkgs/tools/misc/ckb/default.nix b/pkgs/tools/misc/ckb/default.nix index b90adfd5852..41116288e53 100644 --- a/pkgs/tools/misc/ckb/default.nix +++ b/pkgs/tools/misc/ckb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, libudev, pkgconfig, qtbase, qmakeHook, zlib }: +{ stdenv, fetchFromGitHub, libudev, pkgconfig, qtbase, qmake, zlib }: stdenv.mkDerivation rec { version = "0.2.6"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig - qmakeHook + qmake ]; patches = [ diff --git a/pkgs/tools/misc/kronometer/default.nix b/pkgs/tools/misc/kronometer/default.nix index 5ba2543e273..6db3278fade 100644 --- a/pkgs/tools/misc/kronometer/default.nix +++ b/pkgs/tools/misc/kronometer/default.nix @@ -1,29 +1,25 @@ { - kdeDerivation, kdeWrapper, fetchurl, lib, - extra-cmake-modules, kdoctools, + mkDerivation, fetchurl, lib, + extra-cmake-modules, kdoctools, wrapGAppsHook, kconfig, kinit }: let pname = "kronometer"; version = "2.1.3"; - unwrapped = kdeDerivation rec { - name = "${pname}-${version}"; - - src = fetchurl { - url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; - sha256 = "1z06gvaacm3d3a9smlmgg2vf0jdab5kqxx24r6v7iprqzgdpsn4i"; - }; - - meta = with lib; { - license = licenses.gpl2; - maintainers = with maintainers; [ peterhoeg ]; - }; - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - propagatedBuildInputs = [ kconfig kinit ]; - }; in -kdeWrapper { - inherit unwrapped; - targets = [ "bin/kronometer" ]; +mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; + sha256 = "1z06gvaacm3d3a9smlmgg2vf0jdab5kqxx24r6v7iprqzgdpsn4i"; + }; + + meta = with lib; { + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + propagatedBuildInputs = [ kconfig kinit ]; } diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix index dcea9c47aec..52183a3fff3 100644 --- a/pkgs/tools/misc/partition-manager/default.nix +++ b/pkgs/tools/misc/partition-manager/default.nix @@ -1,32 +1,26 @@ -{ kdeDerivation, kdeWrapper, fetchurl, lib -, ecm, kdoctools +{ mkDerivation, fetchurl, lib +, extra-cmake-modules, kdoctools, wrapGAppsHook , kconfig, kinit, kpmcore , eject, libatasmart }: let pname = "partitionmanager"; - unwrapped = kdeDerivation rec { - name = "${pname}-${version}"; - version = "3.0.1"; +in mkDerivation rec { + name = "${pname}-${version}"; + version = "3.0.1"; - src = fetchurl { - url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; - sha256 = "08sb9xa7dvvgha3k2xm1srl339przxpxd2y5bh1lnx6k1x7dk410"; - }; - - meta = with lib; { - description = "KDE Partition Manager"; - license = licenses.gpl2; - maintainers = with maintainers; [ peterhoeg ]; - }; - nativeBuildInputs = [ ecm kdoctools ]; - # refer to kpmcore for the use of eject - buildInputs = [ eject libatasmart ]; - propagatedBuildInputs = [ kconfig kinit kpmcore ]; - enableParallelBuilding = true; + src = fetchurl { + url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz"; + sha256 = "08sb9xa7dvvgha3k2xm1srl339przxpxd2y5bh1lnx6k1x7dk410"; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/partitionmanager" ]; + meta = with lib; { + description = "KDE Partition Manager"; + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg ]; + }; + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + # refer to kpmcore for the use of eject + buildInputs = [ eject libatasmart ]; + propagatedBuildInputs = [ kconfig kinit kpmcore ]; } diff --git a/pkgs/tools/misc/peruse/default.nix b/pkgs/tools/misc/peruse/default.nix index 1c7a28e2975..cd872fd966e 100644 --- a/pkgs/tools/misc/peruse/default.nix +++ b/pkgs/tools/misc/peruse/default.nix @@ -1,6 +1,6 @@ { - kdeDerivation, kdeWrapper, fetchFromGitHub, fetchurl, lib, - extra-cmake-modules, kdoctools, + mkDerivation, fetchFromGitHub, fetchurl, lib, + extra-cmake-modules, kdoctools, wrapGAppsHook, baloo, kconfig, kfilemetadata, kinit, kirigami, knewstuff, plasma-framework }: @@ -13,33 +13,28 @@ let rev = "d1be8c43a82a4320306c8e835a86fdb7b2574ca7"; sha256 = "03ds5da69zipa25rsp76l6xqivrh3wcgygwyqa5x2rgcz3rjnlpr"; }; - unwrapped = kdeDerivation rec { - name = "${pname}-${version}"; - - src = fetchurl { - url = "mirror://kde/stable/${pname}/${name}.tar.xz"; - sha256 = "1ik2627xynkichsq9x28rkczqn3l3p06q6vw5jdafdh3hisccmjq"; - }; - - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - - propagatedBuildInputs = [ baloo kconfig kfilemetadata kinit kirigami knewstuff plasma-framework ]; - - pathsToLink = [ "/etc/xdg/peruse.knsrc"]; - - preConfigure = '' - rm -rf src/qtquick/karchive-rar/external/unarr - ln -s ${unarr} src/qtquick/karchive-rar/external/unarr - ''; - - meta = with lib; { - license = licenses.gpl2; - maintainers = with maintainers; [ peterhoeg ]; - }; +in mkDerivation rec { + name = "${pname}-${version}"; + src = fetchurl { + url = "mirror://kde/stable/${pname}/${name}.tar.xz"; + sha256 = "1ik2627xynkichsq9x28rkczqn3l3p06q6vw5jdafdh3hisccmjq"; + }; + + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + + propagatedBuildInputs = [ baloo kconfig kfilemetadata kinit kirigami knewstuff plasma-framework ]; + + pathsToLink = [ "/etc/xdg/peruse.knsrc"]; + + preConfigure = '' + rm -rf src/qtquick/karchive-rar/external/unarr + ln -s ${unarr} src/qtquick/karchive-rar/external/unarr + ''; + + meta = with lib; { + license = licenses.gpl2; + maintainers = with maintainers; [ peterhoeg ]; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/peruse" "bin/perusecreator" ]; } diff --git a/pkgs/tools/misc/qt5ct/default.nix b/pkgs/tools/misc/qt5ct/default.nix index 016e9726ad9..86750518bb5 100644 --- a/pkgs/tools/misc/qt5ct/default.nix +++ b/pkgs/tools/misc/qt5ct/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qtbase, qtsvg, qttools, qmakeHook, makeQtWrapper }: +{ stdenv, fetchurl, qtbase, qtsvg, qttools, qmake }: stdenv.mkDerivation rec { name = "qt5ct-${version}"; @@ -9,16 +9,13 @@ stdenv.mkDerivation rec { sha256 = "0by0wz40rl9gxvwbd85j0y5xy9mjab1cya96rv48x677v95lhm9f"; }; - nativeBuildInputs = [ makeQtWrapper qmakeHook qttools ]; + propagatedBuildInputs = [ qtbase qtsvg qttools ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ qtbase qtsvg ]; preConfigure = '' - qmakeFlags="$qmakeFlags PLUGINDIR=$out/lib/qt5/plugins" - ''; - - preFixup = '' - wrapQtProgram $out/bin/qt5ct + qmakeFlags="$qmakeFlags PLUGINDIR=$out/$qtPluginPrefix" ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/radeon-profile/default.nix b/pkgs/tools/misc/radeon-profile/default.nix index ab60bd97b35..63f32763f22 100644 --- a/pkgs/tools/misc/radeon-profile/default.nix +++ b/pkgs/tools/misc/radeon-profile/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, qtbase, qmakeHook, makeQtWrapper, libXrandr }: +{ stdenv, fetchFromGitHub, qtbase, qmake, libXrandr }: stdenv.mkDerivation rec { name = "radeon-profile-${version}"; version = "20161221"; - nativeBuildInputs = [ qmakeHook makeQtWrapper ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ qtbase libXrandr ]; src = (fetchFromGitHub { @@ -18,7 +18,6 @@ stdenv.mkDerivation rec { postInstall = '' mkdir -p $out/bin cp ./radeon-profile $out/bin/radeon-profile - wrapQtProgram $out/bin/radeon-profile ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/rockbox-utility/default.nix b/pkgs/tools/misc/rockbox-utility/default.nix index 2ec03094f9f..f84b9563967 100644 --- a/pkgs/tools/misc/rockbox-utility/default.nix +++ b/pkgs/tools/misc/rockbox-utility/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libusb1 -, qtbase, qttools, makeQtWrapper, qmakeHook +, qtbase, qttools, makeWrapper, qmake , withEspeak ? false, espeak ? null }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ libusb1 qtbase qttools ] ++ stdenv.lib.optional withEspeak espeak; - nativeBuildInputs = [ makeQtWrapper pkgconfig qmakeHook ]; + nativeBuildInputs = [ makeWrapper pkgconfig qmake ]; preConfigure = '' cd rbutil/rbutilqt @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { install -Dm755 RockboxUtility $out/bin/rockboxutility ln -s $out/bin/rockboxutility $out/bin/RockboxUtility - wrapQtProgram $out/bin/rockboxutility \ + wrapProgram $out/bin/rockboxutility \ ${stdenv.lib.optionalString withEspeak '' --prefix PATH : ${espeak}/bin ''} diff --git a/pkgs/tools/networking/cmst/default.nix b/pkgs/tools/networking/cmst/default.nix index e5d404d65e1..8b99182242b 100644 --- a/pkgs/tools/networking/cmst/default.nix +++ b/pkgs/tools/networking/cmst/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, qtbase, qmakeHook, makeWrapper, libX11 }: +{ stdenv, fetchFromGitHub, qtbase, qmake, makeWrapper, libX11 }: stdenv.mkDerivation rec { name = "cmst-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0lsg8ya36df48ij0jawgli3f63hy6mn9zcla48whb1l4r7cih545"; }; - nativeBuildInputs = [ makeWrapper qmakeHook ]; + nativeBuildInputs = [ makeWrapper qmake ]; buildInputs = [ qtbase ]; diff --git a/pkgs/tools/security/kwalletcli/default.nix b/pkgs/tools/security/kwalletcli/default.nix index c6217024f1b..c655e9aecf8 100644 --- a/pkgs/tools/security/kwalletcli/default.nix +++ b/pkgs/tools/security/kwalletcli/default.nix @@ -1,5 +1,5 @@ { - kdeDerivation, kdeWrapper, fetchurl, lib, + mkDerivation, fetchurl, lib, pkgconfig, kcoreaddons, ki18n, kwallet, mksh @@ -8,48 +8,42 @@ let pname = "kwalletcli"; version = "3.00"; +in +mkDerivation rec { + name = "${pname}-${version}"; - unwrapped = kdeDerivation rec { - name = "${pname}-${version}"; - - src = fetchurl { - url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz"; - sha256 = "1q87nm7pkmgvkrml6hgbmv0ddx3871w7x86gn90sjc3vw59qfh98"; - }; - - postPatch = '' - substituteInPlace GNUmakefile \ - --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \ - --replace '-I/usr/include/KF5/KI18n' '-I${ki18n.dev}/include/KF5/KI18n' \ - --replace '-I/usr/include/KF5/KWallet' '-I${kwallet.dev}/include/KF5/KWallet' \ - --replace /usr/bin $out/bin \ - --replace /usr/share/man $out/share/man - ''; - - makeFlags = [ "KDE_VER=5" ]; - - # we need this when building against qt 5.8+ - NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; - - nativeBuildInputs = [ pkgconfig ]; - # if using just kwallet, cmake will be added as a buildInput and fail the build - propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ]; - - preInstall = '' - mkdir -p $out/bin $out/share/man/man1 - ''; - - meta = with lib; { - description = "Command-Line Interface to the KDE Wallet"; - homepage = http://www.mirbsd.org/kwalletcli.htm; - license = licenses.miros; - maintainers = with maintainers; [ peterhoeg ]; - }; + src = fetchurl { + url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz"; + sha256 = "1q87nm7pkmgvkrml6hgbmv0ddx3871w7x86gn90sjc3vw59qfh98"; }; -in kdeWrapper { - inherit unwrapped; - targets = map (b: "bin/" + b) - [ "kwalletaskpass" "kwalletcli" "kwalletcli_getpin" "pinentry-kwallet" ]; - paths = [ mksh ]; + postPatch = '' + substituteInPlace GNUmakefile \ + --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \ + --replace '-I/usr/include/KF5/KI18n' '-I${ki18n.dev}/include/KF5/KI18n' \ + --replace '-I/usr/include/KF5/KWallet' '-I${kwallet.dev}/include/KF5/KWallet' \ + --replace /usr/bin $out/bin \ + --replace /usr/share/man $out/share/man + ''; + + makeFlags = [ "KDE_VER=5" ]; + + # we need this when building against qt 5.8+ + NIX_CFLAGS_COMPILE = [ "-std=c++11" ]; + + nativeBuildInputs = [ pkgconfig ]; + # if using just kwallet, cmake will be added as a buildInput and fail the build + propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ]; + propagatedUserEnvPkgs = [ mksh ]; + + preInstall = '' + mkdir -p $out/bin $out/share/man/man1 + ''; + + meta = with lib; { + description = "Command-Line Interface to the KDE Wallet"; + homepage = http://www.mirbsd.org/kwalletcli.htm; + license = licenses.miros; + maintainers = with maintainers; [ peterhoeg ]; + }; } diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix index 124855525ac..e1a2f157085 100644 --- a/pkgs/tools/text/kdiff3/default.nix +++ b/pkgs/tools/text/kdiff3/default.nix @@ -1,51 +1,44 @@ { - kdeDerivation, kdeWrapper, lib, fetchgit, fetchpatch, - extra-cmake-modules, kdoctools, kconfig, kinit, kparts + mkDerivation, lib, fetchgit, fetchpatch, + extra-cmake-modules, kdoctools, wrapGAppsHook, + kconfig, kinit, kparts }: -let - unwrapped = kdeDerivation rec { - name = "kdiff3-${version}"; - version = "1.7.0-2017-02-19"; +mkDerivation rec { + name = "kdiff3-${version}"; + version = "1.7.0-2017-02-19"; - src = fetchgit { - # gitlab is outdated - url = https://anongit.kde.org/scratch/thomasfischer/kdiff3.git; - sha256 = "0znlk9m844a6qsskbd898w4yk48dkg5bkqlkd5abvyrk1jipzyy8"; - rev = "0d2ac328164e3cbe2db35875d3df3a86187ae84f"; - }; - - setSourceRoot = ''sourceRoot="$(echo */kdiff3/)"''; - - patches = [ - (fetchpatch { - name = "git-mergetool.diff"; # see https://gitlab.com/tfischer/kdiff3/merge_requests/2 - url = "https://gitlab.com/vcunat/kdiff3/commit/6106126216.patch"; - sha256 = "16xqc24y8bg8gzkdbwapiwi68rzqnkpz4hgn586mi01ngig2fd7y"; - }) - ]; - patchFlags = "-p 2"; - - postPatch = '' - sed -re "s/(p\\[[^]]+] *== *)('([^']|\\\\')+')/\\1QChar(\\2)/g" -i src/diff.cpp - ''; - - nativeBuildInputs = [ extra-cmake-modules kdoctools ]; - - propagatedBuildInputs = [ kconfig kinit kparts ]; - - enableParallelBuilding = true; - - meta = with lib; { - homepage = http://kdiff3.sourceforge.net/; - license = licenses.gpl2Plus; - description = "Compares and merges 2 or 3 files or directories"; - maintainers = with maintainers; [ viric peterhoeg ]; - platforms = with platforms; linux; - }; + src = fetchgit { + # gitlab is outdated + url = https://anongit.kde.org/scratch/thomasfischer/kdiff3.git; + sha256 = "0znlk9m844a6qsskbd898w4yk48dkg5bkqlkd5abvyrk1jipzyy8"; + rev = "0d2ac328164e3cbe2db35875d3df3a86187ae84f"; }; -in kdeWrapper { - inherit unwrapped; - targets = [ "bin/kdiff3" ]; + setSourceRoot = ''sourceRoot="$(echo */kdiff3/)"''; + + patches = [ + (fetchpatch { + name = "git-mergetool.diff"; # see https://gitlab.com/tfischer/kdiff3/merge_requests/2 + url = "https://gitlab.com/vcunat/kdiff3/commit/6106126216.patch"; + sha256 = "16xqc24y8bg8gzkdbwapiwi68rzqnkpz4hgn586mi01ngig2fd7y"; + }) + ]; + patchFlags = "-p 2"; + + postPatch = '' + sed -re "s/(p\\[[^]]+] *== *)('([^']|\\\\')+')/\\1QChar(\\2)/g" -i src/diff.cpp + ''; + + nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ]; + + propagatedBuildInputs = [ kconfig kinit kparts ]; + + meta = with lib; { + homepage = http://kdiff3.sourceforge.net/; + license = licenses.gpl2Plus; + description = "Compares and merges 2 or 3 files or directories"; + maintainers = with maintainers; [ viric peterhoeg ]; + platforms = with platforms; linux; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ce2a8c3754..3be50635f8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -292,13 +292,6 @@ with pkgs; inherit kernel rootModules allowMissing; }; - kdeDerivation = makeOverridable (import ../build-support/kde/derivation.nix) - { inherit stdenv lib; }; - - kdeWrapper = callPackage ../build-support/kde/wrapper.nix { - inherit (gnome3) dconf; - }; - nixBufferBuilders = import ../build-support/emacs/buffer.nix { inherit (pkgs) lib writeText; inherit (emacsPackagesNg) inherit-local; }; pathsFromGraph = ../build-support/kernel/paths-from-graph.pl; @@ -4049,7 +4042,7 @@ with pkgs; }; quazip_qt4 = libsForQt5.quazip.override { - qtbase = qt4; qmakeHook = qmake4Hook; + qtbase = qt4; qmake = qmake4Hook; }; scrot = callPackage ../tools/graphics/scrot { }; @@ -8233,7 +8226,7 @@ with pkgs; mkFrameworks = import ../development/libraries/kde-frameworks; attrs = { inherit libsForQt5; - inherit kdeDerivation lib fetchurl; + inherit lib fetchurl; }; in recurseIntoAttrs (makeOverridable mkFrameworks attrs); @@ -9761,7 +9754,7 @@ with pkgs; knotifyconfig kpackage kparts kpeople kplotting kpty kross krunner kservice ktexteditor ktextwidgets kunitconversion kwallet kwayland kwidgetsaddons kwindowsystem kxmlgui kxmlrpcclient modemmanager-qt - networkmanager-qt plasma-framework solid sonnet syntax-highlighting + networkmanager-qt plasma-framework prison solid sonnet syntax-highlighting threadweaver; ### KDE PLASMA 5 @@ -9780,6 +9773,8 @@ with pkgs; fcitx-qt5 = callPackage ../tools/inputmethods/fcitx/fcitx-qt5.nix { }; + qgpgme = callPackage ../development/libraries/gpgme { }; + grantlee = callPackage ../development/libraries/grantlee/5.x.nix { }; inherit (callPackage ../development/libraries/kirigami { }) @@ -14620,17 +14615,17 @@ with pkgs; mkApplications = import ../applications/kde; attrs = { inherit stdenv lib libsForQt5 fetchurl recurseIntoAttrs; - inherit kdeDerivation plasma5; + inherit plasma5; inherit attica phonon; }; in recurseIntoAttrs (makeOverridable mkApplications attrs); inherit (kdeApplications) - akonadi ark dolphin ffmpegthumbs filelight gwenview kate - kdenlive kcalc kcolorchooser kcontacts kgpg khelpcenter kig - kolourpaint konsole krfb marble - okteta okular spectacle; + akonadi ark dolphin ffmpegthumbs filelight gwenview kate kdenlive + kcachegrind kcalc kcolorchooser kcontacts kdf kgpg khelpcenter kig kmix + kolourpaint kompare konsole krfb kwalletmanager marble okteta okular + spectacle; kdeconnect = libsForQt5.callPackage ../applications/misc/kdeconnect { }; @@ -15665,7 +15660,7 @@ with pkgs; rofi-menugen = callPackage ../applications/misc/rofi-menugen { }; - rstudio = callPackage ../applications/editors/rstudio { }; + rstudio = libsForQt5.callPackage ../applications/editors/rstudio { }; rsync = callPackage ../applications/networking/sync/rsync { enableACLs = !(stdenv.isDarwin || stdenv.isSunOS || stdenv.isFreeBSD); @@ -15873,16 +15868,7 @@ with pkgs; printrun = callPackage ../applications/misc/printrun { }; - sddm = libsForQt5.callPackage ../applications/display-managers/sddm { - themes = []; # extra themes, etc. - }; - - sddmPlasma5 = sddm.override { - themes = [ - plasma5.plasma-workspace - pkgs.breeze-icons - ]; - }; + sddm = libsForQt5.callPackage ../applications/display-managers/sddm { }; skrooge = libsForQt5.callPackage ../applications/office/skrooge {}; @@ -17570,7 +17556,7 @@ with pkgs; let mkPlasma5 = import ../desktops/plasma-5; attrs = { - inherit libsForQt5 kdeDerivation lib fetchurl; + inherit libsForQt5 lib fetchurl; inherit (gnome3) gconf; }; in