From c3e3111231177af3311db6853fd5b200fda07528 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Jul 2011 13:24:35 +0000 Subject: [PATCH] * Add kde-workspace. * Make sure that polkit actions get installed in $out. svn path=/nixpkgs/branches/kde-4.7/; revision=27737 --- pkgs/desktops/kde-4.7/default.nix | 2 ++ pkgs/desktops/kde-4.7/libs/default.nix | 2 +- .../kde-4.7/libs/polkit-install.patch | 22 ++++++++--------- pkgs/desktops/kde-4.7/workspace.nix | 24 +++++++++++++++++++ .../libraries/polkit-qt-1/default.nix | 2 ++ .../polkit-qt-1/polkit-install.patch | 12 ++++++++++ 6 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 pkgs/desktops/kde-4.7/workspace.nix create mode 100644 pkgs/development/libraries/polkit-qt-1/polkit-install.patch diff --git a/pkgs/desktops/kde-4.7/default.nix b/pkgs/desktops/kde-4.7/default.nix index 62c555e443fa..d839337c8359 100644 --- a/pkgs/desktops/kde-4.7/default.nix +++ b/pkgs/desktops/kde-4.7/default.nix @@ -55,6 +55,8 @@ recurseIntoAttrs rec { kde_baseapps = callPackage ./baseapps.nix { }; + kde_workspace = callPackage ./workspace.nix { }; + ### OTHER MODULES gwenview = callPackage ./gwenview.nix { }; diff --git a/pkgs/desktops/kde-4.7/libs/default.nix b/pkgs/desktops/kde-4.7/libs/default.nix index c36303a187f8..b8b0b3d73672 100644 --- a/pkgs/desktops/kde-4.7/libs/default.nix +++ b/pkgs/desktops/kde-4.7/libs/default.nix @@ -23,7 +23,7 @@ kde.package { #propagatedBuildInputs = [ qt4 gcc.libc strigi soprano attica qca2 # shared_desktop_ontologies ]; - #patches = [ ./polkit-install.patch ]; + patches = [ ./polkit-install.patch ]; # cmake fails to find acl.h because of C++-style comment # TODO: OpenEXR diff --git a/pkgs/desktops/kde-4.7/libs/polkit-install.patch b/pkgs/desktops/kde-4.7/libs/polkit-install.patch index 6633ef1209b4..d2ecac663ec5 100644 --- a/pkgs/desktops/kde-4.7/libs/polkit-install.patch +++ b/pkgs/desktops/kde-4.7/libs/polkit-install.patch @@ -1,12 +1,12 @@ -Author: Yury Kudryashov -Reason: other KDE modules try to install polkit action files into -$kdelibs/share/polkit-1/actions -Upstream: rejected, they propose to set install dir in each package ---- a/cmake/modules/FindPolkitQt-1.cmake.old 2010-08-12 16:13:45.000000000 +0400 -+++ b/cmake/modules/FindPolkitQt-1.cmake 2010-08-12 16:13:56.000000000 +0400 -@@ -101,4 +101,4 @@ - endif (NOT PC_POLKITQT-1_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) - endif (POLKITQT-1_FOUND) +diff -ru -x '*~' kdelibs-4.6.90-orig/kdecore/auth/ConfigureChecks.cmake kdelibs-4.6.90/kdecore/auth/ConfigureChecks.cmake +--- kdelibs-4.6.90-orig/kdecore/auth/ConfigureChecks.cmake 2011-05-20 22:24:54.000000000 +0200 ++++ kdelibs-4.6.90/kdecore/auth/ConfigureChecks.cmake 2011-07-12 14:03:00.000000000 +0200 +@@ -139,7 +139,7 @@ + ${CMAKE_INSTALL_PREFIX} _KDE4_AUTH_POLICY_FILES_INSTALL_DIR + ${POLKITQT-1_POLICY_FILES_INSTALL_DIR}) --set(POLKITQT-1_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions) -+set(POLKITQT-1_POLICY_FILES_INSTALL_DIR share/polkit-1/actions) +- set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR ${_KDE4_AUTH_POLICY_FILES_INSTALL_DIR} CACHE STRING ++ set(KDE4_AUTH_POLICY_FILES_INSTALL_DIR "\${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions" CACHE STRING + "Where policy files generated by KAuth will be installed" FORCE) + elseif(KDE4_AUTH_BACKEND_NAME STREQUAL "FAKE") + set (KAUTH_COMPILING_FAKE_BACKEND TRUE) diff --git a/pkgs/desktops/kde-4.7/workspace.nix b/pkgs/desktops/kde-4.7/workspace.nix new file mode 100644 index 000000000000..b7541dad521b --- /dev/null +++ b/pkgs/desktops/kde-4.7/workspace.nix @@ -0,0 +1,24 @@ +{ automoc4, cmake, kde, kdelibs, qt4, strigi, qimageblitz, libdbusmenu_qt +, xorg, soprano, shared_desktop_ontologies, lm_sensors, pciutils, libraw1394 +, libusb, libxklavier, perl, python +}: + +kde.package { + + buildInputs = + [ cmake kdelibs qt4 automoc4 strigi qimageblitz libdbusmenu_qt + xorg.libxkbfile xorg.libXcomposite xorg.libXScrnSaver xorg.libXtst + xorg.libXcomposite xorg.libXdamage xorg.libXau + soprano shared_desktop_ontologies lm_sensors pciutils libraw1394 + libusb python + ]; + + # Workaround for ‘undefined reference to `dlsym'’ in kwinglutils_funcs.cpp. + NIX_LDFLAGS = "-ldl"; + + meta = { + description = "KDE desktop environment workspace components"; + license = "GPLv2"; + kde.name = "kde-workspace"; + }; +} diff --git a/pkgs/development/libraries/polkit-qt-1/default.nix b/pkgs/development/libraries/polkit-qt-1/default.nix index 7e00c115b100..008a75cff67f 100644 --- a/pkgs/development/libraries/polkit-qt-1/default.nix +++ b/pkgs/development/libraries/polkit-qt-1/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "02m710q34aapbmnz1p6qwgkk5xjmm239zdl3lvjg77dh3j0w5i3r"; }; + patches = [ ./polkit-install.patch ]; + buildInputs = [ cmake qt4 automoc4 ]; propagatedBuildInputs = [ polkit glib ]; diff --git a/pkgs/development/libraries/polkit-qt-1/polkit-install.patch b/pkgs/development/libraries/polkit-qt-1/polkit-install.patch new file mode 100644 index 000000000000..79beda2a3184 --- /dev/null +++ b/pkgs/development/libraries/polkit-qt-1/polkit-install.patch @@ -0,0 +1,12 @@ +diff -ru -x '*~' polkit-qt-1-0.99.0-orig/PolkitQt-1Config.cmake.in polkit-qt-1-0.99.0/PolkitQt-1Config.cmake.in +--- polkit-qt-1-0.99.0-orig/PolkitQt-1Config.cmake.in 2010-12-08 18:22:28.000000000 +0100 ++++ polkit-qt-1-0.99.0/PolkitQt-1Config.cmake.in 2011-07-12 13:26:51.000000000 +0200 +@@ -15,7 +15,7 @@ + + set(POLKITQT-1_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@/polkit-qt-1") + set(POLKITQT-1_LIB_DIR "@LIB_INSTALL_DIR@") +-set(POLKITQT-1_POLICY_FILES_INSTALL_DIR "${POLKITQT-1_INSTALL_DIR}/share/polkit-1/actions") ++set(POLKITQT-1_POLICY_FILES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions") + + # Compatibility + if(WIN32)