diff options
author | Thomas Tuegel <ttuegel@secure.mailbox.org> | 2017-04-30 07:33:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-30 07:33:50 -0500 |
commit | 4e0d21edd189a1d925355aa1af6c96023b8535df (patch) | |
tree | 3eeeea88c1fc77acbc3c013b86b8010faf12ff6d /pkgs/desktops/plasma-5 | |
parent | 5e3de3938e995beaa7f4c6c05a908254b390fdc0 (diff) | |
parent | 6fa2979ebcaa98be0d978474cfbaa68d8d19a896 (diff) | |
download | nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar.gz nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar.bz2 nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar.lz nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar.xz nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.tar.zst nixlib-4e0d21edd189a1d925355aa1af6c96023b8535df.zip |
Merge pull request #25285 from ttuegel/qt--fix-plugin-paths
Qt: purify plugin paths, unify Linux and Darwin builders
Diffstat (limited to 'pkgs/desktops/plasma-5')
-rw-r--r-- | pkgs/desktops/plasma-5/default.nix | 2 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/kwin/default.nix | 8 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/libkscreen.nix | 15 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/libkscreen/default.nix | 19 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch | 27 | ||||
-rw-r--r-- | pkgs/desktops/plasma-5/libkscreen/series | 1 |
6 files changed, 56 insertions, 16 deletions
diff --git a/pkgs/desktops/plasma-5/default.nix b/pkgs/desktops/plasma-5/default.nix index 0cb25a315d6e..1a8f1ed064b0 100644 --- a/pkgs/desktops/plasma-5/default.nix +++ b/pkgs/desktops/plasma-5/default.nix @@ -62,7 +62,7 @@ let kwayland-integration = callPackage ./kwayland-integration.nix {}; kwin = callPackage ./kwin {}; kwrited = callPackage ./kwrited.nix {}; - libkscreen = callPackage ./libkscreen.nix {}; + libkscreen = callPackage ./libkscreen {}; libksysguard = callPackage ./libksysguard {}; milou = callPackage ./milou.nix {}; oxygen = callPackage ./oxygen.nix {}; diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix index 01f90664276e..a14b6433a76e 100644 --- a/pkgs/desktops/plasma-5/kwin/default.nix +++ b/pkgs/desktops/plasma-5/kwin/default.nix @@ -30,4 +30,12 @@ plasmaPackage { --subst-var-by 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 + ''; } diff --git a/pkgs/desktops/plasma-5/libkscreen.nix b/pkgs/desktops/plasma-5/libkscreen.nix deleted file mode 100644 index 4e04fd5ed1d9..000000000000 --- a/pkgs/desktops/plasma-5/libkscreen.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ plasmaPackage -, extra-cmake-modules -, kwayland, libXrandr -, qtx11extras -}: - -plasmaPackage { - name = "libkscreen"; - nativeBuildInputs = [ - extra-cmake-modules - ]; - propagatedBuildInputs = [ - kwayland libXrandr qtx11extras - ]; -} diff --git a/pkgs/desktops/plasma-5/libkscreen/default.nix b/pkgs/desktops/plasma-5/libkscreen/default.nix new file mode 100644 index 000000000000..afb2c20e90cc --- /dev/null +++ b/pkgs/desktops/plasma-5/libkscreen/default.nix @@ -0,0 +1,19 @@ +{ plasmaPackage, lib, copyPathsToStore +, extra-cmake-modules +, kwayland, libXrandr +, qtx11extras +}: + +plasmaPackage { + name = "libkscreen"; + nativeBuildInputs = [ + extra-cmake-modules + ]; + propagatedBuildInputs = [ + kwayland libXrandr qtx11extras + ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); + preConfigure = '' + NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputLib}/lib/qt5/plugins/kf5/kscreen\"" + ''; +} diff --git a/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch b/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch new file mode 100644 index 000000000000..9d3cf49b9cd1 --- /dev/null +++ b/pkgs/desktops/plasma-5/libkscreen/libkscreen-backends-path.patch @@ -0,0 +1,27 @@ +Index: libkscreen-5.9.4/src/backendmanager.cpp +=================================================================== +--- libkscreen-5.9.4.orig/src/backendmanager.cpp ++++ libkscreen-5.9.4/src/backendmanager.cpp +@@ -178,17 +178,11 @@ QFileInfo BackendManager::preferredBacke + QFileInfoList BackendManager::listBackends() + { + // Compile a list of installed backends first +- const QString backendFilter = QStringLiteral("KSC_*"); +- const QStringList paths = QCoreApplication::libraryPaths(); +- QFileInfoList finfos; +- for (const QString &path : paths) { +- const QDir dir(path + QLatin1String("/kf5/kscreen/"), +- backendFilter, +- QDir::SortFlags(QDir::QDir::Name), +- QDir::NoDotAndDotDot | QDir::Files); +- finfos.append(dir.entryInfoList()); +- } +- return finfos; ++ const QDir dir(QStringLiteral(NIXPKGS_LIBKSCREEN_BACKENDS), ++ QStringLiteral("KSC_*"), ++ QDir::SortFlags(QDir::QDir::Name), ++ QDir::NoDotAndDotDot | QDir::Files); ++ return dir.entryInfoList(); + } + + KScreen::AbstractBackend *BackendManager::loadBackendPlugin(QPluginLoader *loader, const QString &name, diff --git a/pkgs/desktops/plasma-5/libkscreen/series b/pkgs/desktops/plasma-5/libkscreen/series new file mode 100644 index 000000000000..86bf4ab10602 --- /dev/null +++ b/pkgs/desktops/plasma-5/libkscreen/series @@ -0,0 +1 @@ +libkscreen-backends-path.patch |