Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 08d25152b85f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f2a651a16875
Choose a head ref

Commits on Jun 18, 2017

  1. qt5: use distinct lib/qt-5.x prefix for each minor version

    Using a distinct prefix for plugins and QML libraries allows multiple Qt 5 minor
    versions to coexist in the same environment.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    3f3d33a View commit details
  2. Copy the full SHA
    210f688 View commit details
  3. Copy the full SHA
    7b6f8dc View commit details
  4. Copy the full SHA
    6beea32 View commit details
  5. Copy the full SHA
    eaa644a View commit details
  6. Copy the full SHA
    945758f View commit details
  7. Remove kdeWrapper

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    be7b7d9 View commit details
  8. Copy the full SHA
    870c07c View commit details
  9. Copy the full SHA
    1607f51 View commit details
  10. qt5: remove makeQtWrapper

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    c816bbc View commit details
  11. Copy the full SHA
    5a8295e View commit details
  12. Copy the full SHA
    6fa4178 View commit details
  13. Copy the full SHA
    d9f29af View commit details
  14. Copy the full SHA
    dea7372 View commit details
  15. Copy the full SHA
    b9ae0c7 View commit details
  16. startkde: use absolute paths to required programs

    The dependency on socat is removed because kwallet setup is deferred to kwallet-pam.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    078c88a View commit details
  17. Copy the full SHA
    7dc961b View commit details
  18. breeze-gtk: bump GTK3 version

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    da942ea View commit details
  19. breeze-gtk: patch builder to find GTK2 pixmap engine

    This does not seem to be strictly necessary, but it also cannot hurt.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    30ff56a View commit details
  20. gpgme: enable Qt 5 bindings

    vandenoever authored and ttuegel committed Jun 18, 2017
    Copy the full SHA
    05ef92e View commit details
  21. qgpgme: init at 1.9.0

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    f5c00c4 View commit details
  22. akonadi: fix runtime paths

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    3acfd31 View commit details
  23. Copy the full SHA
    be9a4fe View commit details
  24. Copy the full SHA
    fceb379 View commit details
  25. prison: init at 5.33.0

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    9149faf View commit details
  26. Copy the full SHA
    087f20e View commit details
  27. kdeFrameworks: fixup inputs and outputs

    - Reduce environment pollution with a separate $bin output containing programs,
      plugins, and shared data. Libraries remain in $out and are not installed into
      the environment.
    - Only propagate build inputs as required.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    faf0d3e View commit details
  28. Copy the full SHA
    fc72335 View commit details
  29. Copy the full SHA
    7af16e5 View commit details
  30. kcmutils: fix kcm plugin path

    ttuegel committed Jun 18, 2017
    Copy the full SHA
    86dac81 View commit details
  31. Copy the full SHA
    a4be1a6 View commit details
  32. Copy the full SHA
    7f95d48 View commit details
  33. Copy the full SHA
    8538d75 View commit details
  34. Copy the full SHA
    acc4576 View commit details
  35. libkscreen: use QLatin1String instead of QStringLiteral

    QStringLiteral stores strings in UTF-16 format, preventing Nix from detecting
    dependencies.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    d9094c0 View commit details
  36. Copy the full SHA
    b7f895d View commit details
  37. Copy the full SHA
    f392614 View commit details
  38. Copy the full SHA
    b1dcd27 View commit details
  39. Copy the full SHA
    c546c26 View commit details
  40. Copy the full SHA
    8cc09c9 View commit details
  41. Copy the full SHA
    99ed585 View commit details
  42. nixpkgs: remove comments from manual about wrapping Qt packages

    It is no longer necessary to wrap Qt packages
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    f3ce852 View commit details
  43. 2
    Copy the full SHA
    ce28d89 View commit details
  44. qt58: determine plugin and import paths from PATH

    Plugin and QML import paths were previously determined by NIX_PROFILES. Using
    PATH instead allows Qt applications to work under nix-shell without further
    modification.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    dab7700 View commit details
  45. qt56: determine plugin and import paths from PATH

    Plugin and QML import paths were previously determined by NIX_PROFILES. Using
    PATH instead allows Qt applications to work under nix-shell without further modification.
    ttuegel committed Jun 18, 2017
    Copy the full SHA
    e6cf9b9 View commit details
  46. Merge pull request #26336 from ttuegel/qt--unwrap

    Unwrap Qt 5 packages
    Thomas Tuegel authored Jun 18, 2017
    Copy the full SHA
    f2a651a View commit details
Showing 362 changed files with 3,295 additions and 3,280 deletions.
68 changes: 46 additions & 22 deletions doc/languages-frameworks/qt.xml
Original file line number Diff line number Diff line change
@@ -2,31 +2,55 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-qt">

<title>Qt and KDE</title>

<para>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.</para>

<section xml:id="ssec-qt-libraries"><title>Libraries</title>

<para>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 <varname>mkLibsForQt5</varname>, which is used to build a set of libraries for every Qt 5 version. The <varname>callPackage</varname> 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. <literal>qtbase</literal> not <literal>qt5.qtbase</literal>, so that <varname>callPackage</varname> can do its work. <emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal> into your package; although it may work fine in the moment, it could well break at the next Qt update.</para>

<para>If a library does not support a particular version of Qt 5, it is best to mark it as broken by setting its <literal>meta.broken</literal> attribute. A package may be marked broken for certain versions by testing the <literal>qtbase.version</literal> attribute, which will always give the current Qt 5 version.</para>
<title>Qt</title>

<para>
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.
</para>

<section xml:id="ssec-qt-libraries"><title>Packaging Libraries for Nixpkgs</title>

<para>
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 <varname>mkLibsForQt5</varname>,
which is used to build a set of libraries for every Qt 5 version.
A special <varname>callPackage</varname> function is used in this scope to ensure that the entire dependency tree uses the same Qt 5 version.
Import dependencies unqualified, i.e., <literal>qtbase</literal> not <literal>qt5.qtbase</literal>.
<emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal>.
</para>

<para>
If a library does not support a particular version of Qt 5, it is best to mark it as broken by setting its <literal>meta.broken</literal> attribute.
A package may be marked broken for certain versions by testing the <literal>qtbase.version</literal> attribute, which will always give the current Qt 5 version.
</para>

</section>

<section xml:id="ssec-qt-applications"><title>Applications</title>

<para>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 <literal>libsForQt5.callPackage</literal> instead of <literal>callPackage</literal>. Dependencies should be imported unqualified, i.e. <literal>qtbase</literal> not <literal>qt5.qtbase</literal>. <emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal> into your package; although it may work fine in the moment, it could well break at the next Qt update.</para>

<para>It is generally best to build an application package against the <varname>libsForQt5</varname> 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. <varname>libsForQt55</varname> for Qt 5.5, if that is the latest version the package supports.</para>

<para>Qt-based applications require that several paths be set at runtime. This is accomplished by wrapping the provided executables in a package with <literal>wrapQtProgram</literal> or <literal>makeQtWrapper</literal> during the <literal>postFixup</literal> phase. To use the wrapper generators, add <literal>makeQtWrapper</literal> to <literal>nativeBuildInputs</literal>. The wrapper generators support the same options as <literal>wrapProgram</literal> and <literal>makeWrapper</literal> respectively. It is usually only necessary to generate wrappers for programs intended to be invoked by the user.</para>

</section>

<section xml:id="ssec-qt-kde"><title>KDE</title>

<para>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 <literal>makeQtWrapper</literal>; instead, use <literal>kdeWrapper</literal> to create the necessary wrappers: <literal>kdeWrapper { unwrapped = <replaceable>expr</replaceable>; targets = <replaceable>exes</replaceable>; }</literal>, where <replaceable>expr</replaceable> is the un-wrapped package expression and <replaceable>exes</replaceable> is a list of strings giving the relative paths to programs in the package which should be wrapped.</para>
<section xml:id="ssec-qt-applications"><title>Packaging Applications for Nixpkgs</title>

<para>
Call your application expression using <literal>libsForQt5.callPackage</literal> instead of <literal>callPackage</literal>.
Import dependencies unqualified, i.e., <literal>qtbase</literal> not <literal>qt5.qtbase</literal>.
<emphasis>Do not</emphasis> import a package set such as <literal>qt5</literal> or <literal>libsForQt5</literal>.
</para>

<para>
Qt 5 maintains strict backward compatibility, so it is generally best to build an application package against the latest version using the <varname>libsForQt5</varname> 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. <varname>libsForQt55</varname> 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.
</para>

<para>
When testing applications in Nixpkgs, it is a common practice to build the package with <literal>nix-build</literal> 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 <literal>nix-env</literal> or run it inside <literal>nix-shell</literal>.
</para>

</section>

34 changes: 7 additions & 27 deletions nixos/modules/services/x11/desktop-managers/plasma5.nix
Original file line number Diff line number Diff line change
@@ -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; };
28 changes: 14 additions & 14 deletions nixos/modules/services/x11/display-managers/sddm.nix
Original file line number Diff line number Diff line change
@@ -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;
18 changes: 5 additions & 13 deletions pkgs/applications/audio/audacious/qt-5.nix
Original file line number Diff line number Diff line change
@@ -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 ];
8 changes: 1 addition & 7 deletions pkgs/applications/audio/cantata/default.nix
Original file line number Diff line number Diff line change
@@ -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";
10 changes: 3 additions & 7 deletions pkgs/applications/audio/dfasma/default.nix
Original file line number Diff line number Diff line change
@@ -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 = ''
4 changes: 2 additions & 2 deletions pkgs/applications/audio/fmit/default.nix
Original file line number Diff line number Diff line change
@@ -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 ]
5 changes: 3 additions & 2 deletions pkgs/applications/audio/iannix/default.nix
Original file line number Diff line number Diff line change
@@ -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=/" ];

5 changes: 3 additions & 2 deletions pkgs/applications/audio/keyfinder/default.nix
Original file line number Diff line number Diff line change
@@ -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 \
Loading