From e362442562576dcf76e914a69e0cc8557311635b Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 17 Jul 2016 14:08:29 -0500 Subject: [PATCH 01/18] kde5: avoid propagating dev outputs to reduce closure size --- .../libraries/kde-frameworks/setup-hook.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/kde-frameworks/setup-hook.sh b/pkgs/development/libraries/kde-frameworks/setup-hook.sh index 5363f4e30fdc..285ad5522533 100644 --- a/pkgs/development/libraries/kde-frameworks/setup-hook.sh +++ b/pkgs/development/libraries/kde-frameworks/setup-hook.sh @@ -22,12 +22,13 @@ _ecmSharePaths=( \ "polkit-1" \ "sounds" \ "templates" \ - "wallpapers" \ - ) + "wallpapers" ) _ecmPropagateNative() { + local target for dir in ${_ecmSharePaths[@]}; do - if [ -d "$1/share/$dir" ]; then + target=$(readlink -m "$1/share/$dir") + if [ "$target" != "$1/share" ] && [ -d "$target" ]; then propagateOnce propagatedNativeBuildInputs "$1" if [ -z "$crossConfig" ]; then propagateOnce propagatedUserEnvPkgs "$1" @@ -41,8 +42,10 @@ _ecmPropagateNative() { envHooks+=(_ecmSetXdgDirs _ecmPropagate) _ecmPropagate() { + local target for dir in ${_ecmSharePaths[@]}; do - if [ -d "$1/share/$dir" ]; then + target=$(readlink -m "$1/share/$dir") + if [ "$target" != "$1/share" ] && [ -d "$target" ]; then propagateOnce propagatedBuildInputs "$1" propagateOnce propagatedUserEnvPkgs "$1" addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share" From 795cfd578a4ec8c9b78b39cf60102904a23af993 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 17 Jul 2016 15:42:41 -0500 Subject: [PATCH 02/18] kde5.plasma: unwrap everything --- pkgs/desktops/kde-5/plasma/bluedevil.nix | 16 +++++------- pkgs/desktops/kde-5/plasma/kde-cli-tools.nix | 25 ++++++------------- pkgs/desktops/kde-5/plasma/kinfocenter.nix | 11 ++------ pkgs/desktops/kde-5/plasma/kmenuedit.nix | 11 ++------ pkgs/desktops/kde-5/plasma/kscreen.nix | 10 ++------ pkgs/desktops/kde-5/plasma/kscreenlocker.nix | 5 +--- pkgs/desktops/kde-5/plasma/ksshaskpass.nix | 7 ++---- pkgs/desktops/kde-5/plasma/ksysguard.nix | 11 ++------ pkgs/desktops/kde-5/plasma/kwin/default.nix | 5 ---- .../kde-5/plasma/plasma-desktop/default.nix | 18 ++----------- .../kde-5/plasma/plasma-nm/default.nix | 11 ++------ .../plasma/plasma-workspace-wallpapers.nix | 1 + .../kde-5/plasma/plasma-workspace/default.nix | 4 +-- .../kde-5/plasma/polkit-kde-agent.nix | 20 ++++----------- pkgs/desktops/kde-5/plasma/powerdevil.nix | 5 +--- pkgs/desktops/kde-5/plasma/systemsettings.nix | 3 --- 16 files changed, 36 insertions(+), 127 deletions(-) diff --git a/pkgs/desktops/kde-5/plasma/bluedevil.nix b/pkgs/desktops/kde-5/plasma/bluedevil.nix index 677a6ce961b9..1deef241a62f 100644 --- a/pkgs/desktops/kde-5/plasma/bluedevil.nix +++ b/pkgs/desktops/kde-5/plasma/bluedevil.nix @@ -1,22 +1,18 @@ -{ plasmaPackage, ecm, bluez-qt, kcoreaddons -, kdbusaddons, kded, ki18n, kiconthemes, kio, knotifications -, kwidgetsaddons, kwindowsystem, makeQtWrapper, plasma-framework -, qtdeclarative, shared_mime_info +{ + plasmaPackage, ecm, shared_mime_info, + bluez-qt, kcoreaddons, kdbusaddons, kded, ki18n, kiconthemes, kio, + knotifications, kwidgetsaddons, kwindowsystem, plasma-framework, qtdeclarative }: plasmaPackage { name = "bluedevil"; - nativeBuildInputs = [ - ecm makeQtWrapper shared_mime_info - ]; + nativeBuildInputs = [ ecm shared_mime_info ]; propagatedBuildInputs = [ bluez-qt ki18n kio kwindowsystem plasma-framework qtdeclarative kcoreaddons kdbusaddons kded kiconthemes knotifications kwidgetsaddons ]; - propagatedUserEnvPkgs = [ bluez-qt ]; + propagatedUserEnvPkgs = [ bluez-qt.out ]; postInstall = '' - wrapQtProgram "$out/bin/bluedevil-wizard" - wrapQtProgram "$out/bin/bluedevil-sendfile" # 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/kde-5/plasma/kde-cli-tools.nix b/pkgs/desktops/kde-5/plasma/kde-cli-tools.nix index e6216650c8af..33a7340cb85f 100644 --- a/pkgs/desktops/kde-5/plasma/kde-cli-tools.nix +++ b/pkgs/desktops/kde-5/plasma/kde-cli-tools.nix @@ -1,25 +1,14 @@ -{ plasmaPackage, ecm, kcmutils, kconfig -, kdelibs4support, kdesu, kdoctools, ki18n, kiconthemes -, kwindowsystem, makeQtWrapper, qtsvg, qtx11extras +{ + plasmaPackage, ecm, + kcmutils, kconfig, kdelibs4support, kdesu, kdoctools, ki18n, kiconthemes, + kwindowsystem, qtsvg, qtx11extras }: plasmaPackage { name = "kde-cli-tools"; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ - kdelibs4support ki18n kwindowsystem qtsvg qtx11extras kcmutils kconfig kdesu - kiconthemes + kcmutils kconfig kdesu kdelibs4support ki18n kiconthemes kwindowsystem qtsvg + qtx11extras ]; - postInstall = '' - wrapQtProgram "$out/bin/kmimetypefinder5" - wrapQtProgram "$out/bin/ksvgtopng5" - wrapQtProgram "$out/bin/ktraderclient5" - wrapQtProgram "$out/bin/kioclient5" - wrapQtProgram "$out/bin/kdecp5" - wrapQtProgram "$out/bin/keditfiletype5" - wrapQtProgram "$out/bin/kcmshell5" - wrapQtProgram "$out/bin/kdemv5" - wrapQtProgram "$out/bin/kstart5" - wrapQtProgram "$out/bin/kde-open5" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/kinfocenter.nix b/pkgs/desktops/kde-5/plasma/kinfocenter.nix index 1d2918ae27b0..dd9bdbd31bdf 100644 --- a/pkgs/desktops/kde-5/plasma/kinfocenter.nix +++ b/pkgs/desktops/kde-5/plasma/kinfocenter.nix @@ -1,23 +1,16 @@ { plasmaPackage, ecm, kdoctools, kcmutils , kcompletion, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons , kdeclarative, kdelibs4support, ki18n, kiconthemes, kio, kpackage -, kservice, kwidgetsaddons, kxmlgui, libraw1394, makeQtWrapper +, kservice, kwidgetsaddons, kxmlgui, libraw1394 , pciutils, solid }: plasmaPackage { name = "kinfocenter"; - nativeBuildInputs = [ - ecm - kdoctools - makeQtWrapper - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kdeclarative kdelibs4support ki18n kio kcmutils kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons kiconthemes kpackage kservice kwidgetsaddons kxmlgui libraw1394 pciutils solid ]; - postInstall = '' - wrapQtProgram "$out/bin/kinfocenter" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/kmenuedit.nix b/pkgs/desktops/kde-5/plasma/kmenuedit.nix index 377f39076d98..3adb77a00517 100644 --- a/pkgs/desktops/kde-5/plasma/kmenuedit.nix +++ b/pkgs/desktops/kde-5/plasma/kmenuedit.nix @@ -1,18 +1,11 @@ { plasmaPackage, ecm, kdoctools, ki18n, kxmlgui -, kdbusaddons, kiconthemes, kio, sonnet, kdelibs4support, makeQtWrapper +, kdbusaddons, kiconthemes, kio, sonnet, kdelibs4support }: plasmaPackage { name = "kmenuedit"; - nativeBuildInputs = [ - ecm - kdoctools - makeQtWrapper - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kdelibs4support ki18n kio sonnet kxmlgui kdbusaddons kiconthemes ]; - postInstall = '' - wrapQtProgram "$out/bin/kmenuedit" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/kscreen.nix b/pkgs/desktops/kde-5/plasma/kscreen.nix index 28e0f7af33d2..ecbd88c2146d 100644 --- a/pkgs/desktops/kde-5/plasma/kscreen.nix +++ b/pkgs/desktops/kde-5/plasma/kscreen.nix @@ -1,19 +1,13 @@ { plasmaPackage, ecm, kconfig, kconfigwidgets , kdbusaddons, kglobalaccel, ki18n, kwidgetsaddons, kxmlgui -, libkscreen, makeQtWrapper, qtdeclarative, qtgraphicaleffects +, libkscreen, qtdeclarative, qtgraphicaleffects }: plasmaPackage { name = "kscreen"; - nativeBuildInputs = [ - ecm - makeQtWrapper - ]; + nativeBuildInputs = [ ecm ]; propagatedBuildInputs = [ kglobalaccel ki18n libkscreen qtdeclarative qtgraphicaleffects kconfig kconfigwidgets kdbusaddons kwidgetsaddons kxmlgui ]; - postInstall = '' - wrapQtProgram "$out/bin/kscreen-console" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/kscreenlocker.nix b/pkgs/desktops/kde-5/plasma/kscreenlocker.nix index 9a28a800a641..8fb5d9e708bc 100644 --- a/pkgs/desktops/kde-5/plasma/kscreenlocker.nix +++ b/pkgs/desktops/kde-5/plasma/kscreenlocker.nix @@ -5,10 +5,7 @@ plasmaPackage { name = "kscreenlocker"; - nativeBuildInputs = [ - ecm - kdoctools - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kdeclarative plasma-framework qtdeclarative kcmutils kcrash kdelibs4support kglobalaccel kidletime kwayland libXcursor pam wayland diff --git a/pkgs/desktops/kde-5/plasma/ksshaskpass.nix b/pkgs/desktops/kde-5/plasma/ksshaskpass.nix index 0adfb6de238c..80b529a66685 100644 --- a/pkgs/desktops/kde-5/plasma/ksshaskpass.nix +++ b/pkgs/desktops/kde-5/plasma/ksshaskpass.nix @@ -1,12 +1,9 @@ { plasmaPackage, ecm, kdoctools, kcoreaddons -, ki18n, kwallet, kwidgetsaddons, makeQtWrapper +, ki18n, kwallet, kwidgetsaddons }: plasmaPackage { name = "ksshaskpass"; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kcoreaddons ki18n kwallet kwidgetsaddons ]; - postInstall = '' - wrapQtProgram "$out/bin/ksshaskpass" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/ksysguard.nix b/pkgs/desktops/kde-5/plasma/ksysguard.nix index 44335c5fa743..b0e94c6a5958 100644 --- a/pkgs/desktops/kde-5/plasma/ksysguard.nix +++ b/pkgs/desktops/kde-5/plasma/ksysguard.nix @@ -1,20 +1,13 @@ { plasmaPackage, ecm, kdoctools, kconfig , kcoreaddons, kdelibs4support, ki18n, kitemviews, knewstuff -, kiconthemes, libksysguard, makeQtWrapper +, kiconthemes, libksysguard }: plasmaPackage { name = "ksysguard"; - nativeBuildInputs = [ - ecm - kdoctools - makeQtWrapper - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kconfig kcoreaddons kitemviews knewstuff kiconthemes libksysguard kdelibs4support ki18n ]; - postInstall = '' - wrapQtProgram "$out/bin/ksysguardd" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/kwin/default.nix b/pkgs/desktops/kde-5/plasma/kwin/default.nix index 382ed3ef9393..d121ba84dd00 100644 --- a/pkgs/desktops/kde-5/plasma/kwin/default.nix +++ b/pkgs/desktops/kde-5/plasma/kwin/default.nix @@ -13,7 +13,6 @@ plasmaPackage { nativeBuildInputs = [ ecm kdoctools - makeQtWrapper ]; propagatedBuildInputs = [ kactivities kdeclarative kglobalaccel ki18n kio kscreenlocker kwindowsystem @@ -25,8 +24,4 @@ plasmaPackage { ]; patches = [ ./0001-qdiriterator-follow-symlinks.patch ]; cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; - postInstall = '' - wrapQtProgram "$out/bin/kwin_x11" - wrapQtProgram "$out/bin/kwin_wayland" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix b/pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix index 6b54dcd20d44..dc4e81ef4eaa 100644 --- a/pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix +++ b/pkgs/desktops/kde-5/plasma/plasma-desktop/default.nix @@ -6,17 +6,13 @@ , plasma-framework, plasma-workspace, qtdeclarative, qtx11extras , qtsvg, libXcursor, libXft, libxkbfile, xf86inputevdev , xf86inputsynaptics, xinput, xkeyboard_config, xorgserver -, libcanberra_kde, libpulseaudio, makeQtWrapper, utillinux +, libcanberra_kde, libpulseaudio, utillinux , qtquickcontrols, ksysguard }: plasmaPackage rec { name = "plasma-desktop"; - nativeBuildInputs = [ - ecm - kdoctools - makeQtWrapper - ]; + nativeBuildInputs = [ ecm kdoctools ]; buildInputs = [ attica boost fontconfig kcmutils kdbusaddons kded kitemmodels knewstuff knotifications knotifyconfig kwallet libcanberra_kde libXcursor @@ -42,14 +38,4 @@ plasmaPackage rec { "-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg" "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics}/include/xorg" ]; - postInstall = '' - wrapQtProgram "$out/bin/kaccess" - wrapQtProgram "$out/bin/solid-action-desktop-gen" - wrapQtProgram "$out/bin/knetattach" - wrapQtProgram "$out/bin/krdb" - wrapQtProgram "$out/bin/kapplymousetheme" - wrapQtProgram "$out/bin/kfontinst" - wrapQtProgram "$out/bin/kcm-touchpad-list-devices" - wrapQtProgram "$out/bin/kfontview" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/plasma-nm/default.nix b/pkgs/desktops/kde-5/plasma/plasma-nm/default.nix index 0deef373f4f7..b6d18dbf91d9 100644 --- a/pkgs/desktops/kde-5/plasma/plasma-nm/default.nix +++ b/pkgs/desktops/kde-5/plasma/plasma-nm/default.nix @@ -2,7 +2,7 @@ , kcompletion, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative , kdelibs4support, ki18n, kiconthemes, kinit, kio, kitemviews , knotifications, kservice, kwallet, kwidgetsaddons, kwindowsystem -, kxmlgui, makeQtWrapper, mobile_broadband_provider_info +, kxmlgui, mobile_broadband_provider_info , modemmanager-qt, networkmanager-qt, openconnect, plasma-framework , qca-qt5, qtdeclarative, solid }: @@ -15,11 +15,7 @@ plasmaPackage { inherit mobile_broadband_provider_info; }) ]; - nativeBuildInputs = [ - ecm - kdoctools - makeQtWrapper - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kdeclarative kdelibs4support ki18n kio kwindowsystem plasma-framework qtdeclarative kcompletion kconfigwidgets kcoreaddons kdbusaddons kiconthemes @@ -27,7 +23,4 @@ plasmaPackage { mobile_broadband_provider_info modemmanager-qt networkmanager-qt openconnect qca-qt5 solid ]; - postInstall = '' - wrapQtProgram "$out/bin/kde5-nm-connection-editor" - ''; } diff --git a/pkgs/desktops/kde-5/plasma/plasma-workspace-wallpapers.nix b/pkgs/desktops/kde-5/plasma/plasma-workspace-wallpapers.nix index da2a5b59d2d9..6ffdb17cbeab 100644 --- a/pkgs/desktops/kde-5/plasma/plasma-workspace-wallpapers.nix +++ b/pkgs/desktops/kde-5/plasma/plasma-workspace-wallpapers.nix @@ -4,6 +4,7 @@ plasmaPackage { name = "plasma-workspace-wallpapers"; + outputs = [ "out" ]; nativeBuildInputs = [ ecm ]; diff --git a/pkgs/desktops/kde-5/plasma/plasma-workspace/default.nix b/pkgs/desktops/kde-5/plasma/plasma-workspace/default.nix index 39788a4d7c48..09bba4a709f7 100644 --- a/pkgs/desktops/kde-5/plasma/plasma-workspace/default.nix +++ b/pkgs/desktops/kde-5/plasma/plasma-workspace/default.nix @@ -14,9 +14,7 @@ plasmaPackage { name = "plasma-workspace"; - nativeBuildInputs = [ - ecm kdoctools - ]; + nativeBuildInputs = [ ecm kdoctools ]; buildInputs = [ baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff diff --git a/pkgs/desktops/kde-5/plasma/polkit-kde-agent.nix b/pkgs/desktops/kde-5/plasma/polkit-kde-agent.nix index 1016912de297..002c2bb10ff3 100644 --- a/pkgs/desktops/kde-5/plasma/polkit-kde-agent.nix +++ b/pkgs/desktops/kde-5/plasma/polkit-kde-agent.nix @@ -1,22 +1,12 @@ -{ plasmaPackage -, ecm -, ki18n -, kwindowsystem -, kdbusaddons -, kwidgetsaddons -, kcoreaddons -, kcrash -, kconfig -, kiconthemes -, knotifications -, polkit-qt +{ + plasmaPackage, ecm, + kcoreaddons, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, knotifications, + kwidgetsaddons, kwindowsystem, polkit-qt }: plasmaPackage { name = "polkit-kde-agent"; - nativeBuildInputs = [ - ecm - ]; + nativeBuildInputs = [ ecm ]; propagatedBuildInputs = [ kdbusaddons kwidgetsaddons kcoreaddons kcrash kconfig ki18n kiconthemes knotifications kwindowsystem polkit-qt diff --git a/pkgs/desktops/kde-5/plasma/powerdevil.nix b/pkgs/desktops/kde-5/plasma/powerdevil.nix index ba08fa86ef0c..c0c18a6eae6c 100644 --- a/pkgs/desktops/kde-5/plasma/powerdevil.nix +++ b/pkgs/desktops/kde-5/plasma/powerdevil.nix @@ -6,10 +6,7 @@ plasmaPackage { name = "powerdevil"; - nativeBuildInputs = [ - ecm - kdoctools - ]; + nativeBuildInputs = [ ecm kdoctools ]; propagatedBuildInputs = [ kconfig kdbusaddons knotifyconfig solid udev bluez-qt kactivities kauth kdelibs4support kglobalaccel ki18n kio kidletime kwayland libkscreen diff --git a/pkgs/desktops/kde-5/plasma/systemsettings.nix b/pkgs/desktops/kde-5/plasma/systemsettings.nix index 1e1c396a44d2..407d0e916264 100644 --- a/pkgs/desktops/kde-5/plasma/systemsettings.nix +++ b/pkgs/desktops/kde-5/plasma/systemsettings.nix @@ -11,7 +11,4 @@ plasmaPackage { kcmutils kconfig kdbusaddons khtml ki18n kiconthemes kio kitemviews kservice kwindowsystem kxmlgui qtquickcontrols ]; - postInstall = '' - wrapQtProgram "$out/bin/systemsettings5" - ''; } From c122f791c95db53a0d86d0dffc9e4a7b2fda12bd Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 16:16:36 -0500 Subject: [PATCH 03/18] Add kdeEnv and kdeWrapper --- .../kde-5/applications/dolphin-plugins.nix | 4 +- pkgs/desktops/kde-5/applications/dolphin.nix | 47 +++---- .../libraries/kde-frameworks/default.nix | 16 ++- .../libraries/kde-frameworks/kde-env.nix | 34 +++++ .../libraries/kde-frameworks/kde-wrapper.nix | 47 +++++++ .../libraries/kde-frameworks/setup-hook.sh | 117 +++++------------- 6 files changed, 158 insertions(+), 107 deletions(-) create mode 100644 pkgs/development/libraries/kde-frameworks/kde-env.nix create mode 100644 pkgs/development/libraries/kde-frameworks/kde-wrapper.nix diff --git a/pkgs/desktops/kde-5/applications/dolphin-plugins.nix b/pkgs/desktops/kde-5/applications/dolphin-plugins.nix index 500dd29c1009..e9932adc5dca 100644 --- a/pkgs/desktops/kde-5/applications/dolphin-plugins.nix +++ b/pkgs/desktops/kde-5/applications/dolphin-plugins.nix @@ -11,5 +11,7 @@ kdeApp { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ ecm kdoctools ]; - propagatedBuildInputs = [ dolphin kdelibs4support ki18n kio kxmlgui ]; + propagatedBuildInputs = [ + dolphin.unwrapped kdelibs4support ki18n kio kxmlgui + ]; } diff --git a/pkgs/desktops/kde-5/applications/dolphin.nix b/pkgs/desktops/kde-5/applications/dolphin.nix index 8145d948391f..27e4a38741e7 100644 --- a/pkgs/desktops/kde-5/applications/dolphin.nix +++ b/pkgs/desktops/kde-5/applications/dolphin.nix @@ -1,26 +1,31 @@ { - kdeApp, lib, + kdeApp, lib, kdeWrapper, ecm, kdoctools, makeQtWrapper, - baloo, baloo-widgets, kactivities, kbookmarks, kcmutils, kcompletion, kconfig, - kcoreaddons, kdelibs4support, kdbusaddons, kfilemetadata, ki18n, kiconthemes, - kinit, kio, knewstuff, knotifications, kparts, ktexteditor, kwindowsystem, - phonon, solid + baloo, baloo-widgets, dolphin-plugins, kactivities, kbookmarks, kcmutils, + kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons, + kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications, + kparts, ktexteditor, kwindowsystem, phonon, solid }: -kdeApp { - name = "dolphin"; - meta = { - license = with lib.licenses; [ gpl2 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ ecm 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 - ]; - postInstall = '' - wrapQtProgram "$out/bin/dolphin" - ''; +let + unwrapped = + kdeApp { + name = "dolphin"; + meta = { + license = with lib.licenses; [ gpl2 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ ecm 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 unwrapped +{ + targets = [ "bin/dolphin" ]; + paths = [ dolphin-plugins ]; } diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index 74e9df114f0b..d5164297161a 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -24,7 +24,10 @@ let let in stdenv.mkDerivation (args // { - outputs = args.outputs or [ "dev" "out" ]; + outputs = args.outputs or [ "dev" "out" "bin" ]; + + propagatedUserEnvPkgs = + builtins.map lib.getBin (args.propagatedBuildInputs or []); cmakeFlags = (args.cmakeFlags or []) @@ -50,6 +53,17 @@ let } // (args.meta or {}); }); + kdeEnv = import ./kde-env.nix { + inherit (pkgs) stdenv lib; + inherit (pkgs.xorg) lndir; + inherit ecmNoHooks; + }; + + kdeWrapper = import ./kde-wrapper.nix { + inherit (pkgs) stdenv lib makeWrapper; + inherit kdeEnv; + }; + attica = callPackage ./attica.nix {}; baloo = callPackage ./baloo.nix {}; bluez-qt = callPackage ./bluez-qt.nix {}; diff --git a/pkgs/development/libraries/kde-frameworks/kde-env.nix b/pkgs/development/libraries/kde-frameworks/kde-env.nix new file mode 100644 index 000000000000..f4ad528454b2 --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kde-env.nix @@ -0,0 +1,34 @@ +{ stdenv, lib, lndir, ecmNoHooks }: + +name: pkgs: + +let + inherit (builtins.parseDrvName ecmNoHooks.name) version; +in +stdenv.mkDerivation { + name = "kde-env-${name}"; + nativeBuildInputs = [ lndir ]; + propagatedUserEnvPkgs = builtins.map lib.getBin pkgs; + unpackPhase = "true"; + configurePhase = "runHook preConfigure; runHook postConfigure"; + buildPhase = "true"; + installPhase = '' + runHook preInstall + + propagated="" + for i in $propagatedUserEnvPkgs; do + findInputs $i propagated propagated-user-env-packages + done + + for tgt in bin etc/xdg lib/libexec lib/qt5 share; do + mkdir -p "$out/$tgt" + for p in $propagated; do + if [ -d "$p/$tgt" ]; then + lndir -silent "$p/$tgt" "$out/$tgt" >/dev/null 2>&1 + fi + done + done + + runHook postInstall + ''; +} diff --git a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix new file mode 100644 index 000000000000..3d0c104c9053 --- /dev/null +++ b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix @@ -0,0 +1,47 @@ +{ stdenv, lib, makeWrapper, kdeEnv }: + +drv: + +{ targets, paths }: + +let + env = kdeEnv drv.name ([ drv ] ++ paths); +in +stdenv.mkDerivation { + inherit (drv) name; + + drv = lib.getBin drv; + inherit env targets; + passthru = { unwrapped = drv; }; + + nativeBuildInputs = [ makeWrapper ]; + + unpackPhase = "true"; + configurePhase = "runHook preConfigure; runHook postConfigure"; + buildPhase = "true"; + + installPhase = '' + for t in $targets; 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" \ + --set QML_IMPORT_PATH "$env/lib/qt5/imports" \ + --set QML2_IMPORT_PATH "$env/lib/qt5/qml" \ + --set QT_PLUGIN_PATH "$env/lib/qt5/plugins" + else + echo "no such file or directory: $drv/$t" + exit 1 + fi + done + + for s in applications dbus-1 desktop-directories icons mime polkit-1; do + if [ -d "$env/share/$s" ]; then + mkdir -p "$out/share" + ln -s "$env/share/$s" "$out/share/$s" + fi + done + ''; +} diff --git a/pkgs/development/libraries/kde-frameworks/setup-hook.sh b/pkgs/development/libraries/kde-frameworks/setup-hook.sh index 285ad5522533..a1638ca541be 100644 --- a/pkgs/development/libraries/kde-frameworks/setup-hook.sh +++ b/pkgs/development/libraries/kde-frameworks/setup-hook.sh @@ -1,60 +1,9 @@ _ecmSetXdgDirs() { addToSearchPathOnce XDG_DATA_DIRS "$1/share" addToSearchPathOnce XDG_CONFIG_DIRS "$1/etc/xdg" - addToSearchPathOnce RUNTIME_XDG_CONFIG_DIRS "$1/etc/xdg" } -_ecmSharePaths=( \ - "appdata" \ - "applications" \ - "config.cfg" \ - "dbus-1" \ - "desktop-directories" \ - "doc" \ - "icons" \ - "kconf_update" \ - "kservices5" \ - "kservicetypes5" \ - "knotifications5" \ - "kxmlgui5" \ - "locale" \ - "mime" \ - "polkit-1" \ - "sounds" \ - "templates" \ - "wallpapers" ) - -_ecmPropagateNative() { - local target - for dir in ${_ecmSharePaths[@]}; do - target=$(readlink -m "$1/share/$dir") - if [ "$target" != "$1/share" ] && [ -d "$target" ]; then - propagateOnce propagatedNativeBuildInputs "$1" - if [ -z "$crossConfig" ]; then - propagateOnce propagatedUserEnvPkgs "$1" - addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share" - fi - break - fi - done -} - -envHooks+=(_ecmSetXdgDirs _ecmPropagate) - -_ecmPropagate() { - local target - for dir in ${_ecmSharePaths[@]}; do - target=$(readlink -m "$1/share/$dir") - if [ "$target" != "$1/share" ] && [ -d "$target" ]; then - propagateOnce propagatedBuildInputs "$1" - propagateOnce propagatedUserEnvPkgs "$1" - addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share" - break - fi - done -} - -crossEnvHooks+=(_ecmPropagate) +envHooks+=(_ecmSetXdgDirs) _ecmConfig() { # Because we need to use absolute paths here, we must set *all* the paths. @@ -62,41 +11,41 @@ _ecmConfig() { cmakeFlags+=" -DKDE_INSTALL_BINDIR=${!outputBin}/bin" cmakeFlags+=" -DKDE_INSTALL_SBINDIR=${!outputBin}/sbin" cmakeFlags+=" -DKDE_INSTALL_LIBDIR=${!outputLib}/lib" - cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputLib}/lib/libexec" + cmakeFlags+=" -DKDE_INSTALL_LIBEXECDIR=${!outputBin}/lib/libexec" cmakeFlags+=" -DKDE_INSTALL_CMAKEPACKAGEDIR=${!outputDev}/lib/cmake" - cmakeFlags+=" -DKDE_INSTALL_QTPLUGINDIR=${!outputLib}/lib/qt5/plugins" - cmakeFlags+=" -DKDE_INSTALL_PLUGINDIR=${!outputLib}/lib/qt5/plugins" - cmakeFlags+=" -DKDE_INSTALL_QTQUICKIMPORTSDIR=${!outputLib}/lib/qt5/imports" - cmakeFlags+=" -DKDE_INSTALL_QMLDIR=${!outputLib}/lib/qt5/qml" + 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=${!outputLib}/share" - cmakeFlags+=" -DKDE_INSTALL_DATADIR=${!outputLib}/share" - cmakeFlags+=" -DKDE_INSTALL_DOCBUNDLEDIR=${!outputLib}/share/doc/HTML" - cmakeFlags+=" -DKDE_INSTALL_KCFGDIR=${!outputLib}/share/config.kcfg" - cmakeFlags+=" -DKDE_INSTALL_KCONFUPDATEDIR=${!outputLib}/share/kconf_update" - cmakeFlags+=" -DKDE_INSTALL_KSERVICES5DIR=${!outputLib}/share/kservices5" - cmakeFlags+=" -DKDE_INSTALL_KSERVICETYPES5DIR=${!outputLib}/share/kservicetypes5" - cmakeFlags+=" -DKDE_INSTALL_KXMLGUI5DIR=${!outputLib}/share/kxmlgui5" - cmakeFlags+=" -DKDE_INSTALL_KNOTIFY5RCDIR=${!outputLib}/share/knotifications5" - cmakeFlags+=" -DKDE_INSTALL_ICONDIR=${!outputLib}/share/icons" - cmakeFlags+=" -DKDE_INSTALL_LOCALEDIR=${!outputLib}/share/locale" - cmakeFlags+=" -DKDE_INSTALL_SOUNDDIR=${!outputLib}/share/sounds" - cmakeFlags+=" -DKDE_INSTALL_TEMPLATEDIR=${!outputLib}/share/templates" - cmakeFlags+=" -DKDE_INSTALL_WALLPAPERDIR=${!outputLib}/share/wallpapers" - cmakeFlags+=" -DKDE_INSTALL_APPDIR=${!outputLib}/share/applications" - cmakeFlags+=" -DKDE_INSTALL_DESKTOPDIR=${!outputLib}/share/desktop-directories" - cmakeFlags+=" -DKDE_INSTALL_MIMEDIR=${!outputLib}/share/mime/packages" - cmakeFlags+=" -DKDE_INSTALL_METAINFODIR=${!outputLib}/share/appdata" - cmakeFlags+=" -DKDE_INSTALL_MANDIR=${!outputLib}/share/man" - cmakeFlags+=" -DKDE_INSTALL_INFODIR=${!outputLib}/share/info" - cmakeFlags+=" -DKDE_INSTALL_DBUSDIR=${!outputLib}/share/dbus-1" - cmakeFlags+=" -DKDE_INSTALL_DBUSINTERFACEDIR=${!outputLib}/share/dbus-1/interfaces" - cmakeFlags+=" -DKDE_INSTALL_DBUSSERVICEDIR=${!outputLib}/share/dbus-1/services" - cmakeFlags+=" -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=${!outputLib}/share/dbus-1/system-services" - cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputLib}/etc" - cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputLib}/etc/xdg" - cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputLib}/etc/xdg/autostart" + cmakeFlags+=" -DKDE_INSTALL_DATAROOTDIR=${!outputBin}/share" + cmakeFlags+=" -DKDE_INSTALL_DATADIR=${!outputBin}/share" + cmakeFlags+=" -DKDE_INSTALL_DOCBUNDLEDIR=${!outputBin}/share/doc/HTML" + cmakeFlags+=" -DKDE_INSTALL_KCFGDIR=${!outputBin}/share/config.kcfg" + cmakeFlags+=" -DKDE_INSTALL_KCONFUPDATEDIR=${!outputBin}/share/kconf_update" + cmakeFlags+=" -DKDE_INSTALL_KSERVICES5DIR=${!outputBin}/share/kservices5" + cmakeFlags+=" -DKDE_INSTALL_KSERVICETYPES5DIR=${!outputBin}/share/kservicetypes5" + 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_SOUNDDIR=${!outputBin}/share/sounds" + cmakeFlags+=" -DKDE_INSTALL_TEMPLATEDIR=${!outputBin}/share/templates" + cmakeFlags+=" -DKDE_INSTALL_WALLPAPERDIR=${!outputBin}/share/wallpapers" + cmakeFlags+=" -DKDE_INSTALL_APPDIR=${!outputBin}/share/applications" + cmakeFlags+=" -DKDE_INSTALL_DESKTOPDIR=${!outputBin}/share/desktop-directories" + cmakeFlags+=" -DKDE_INSTALL_MIMEDIR=${!outputBin}/share/mime/packages" + cmakeFlags+=" -DKDE_INSTALL_METAINFODIR=${!outputBin}/share/appdata" + cmakeFlags+=" -DKDE_INSTALL_MANDIR=${!outputBin}/share/man" + cmakeFlags+=" -DKDE_INSTALL_INFODIR=${!outputBin}/share/info" + cmakeFlags+=" -DKDE_INSTALL_DBUSDIR=${!outputBin}/share/dbus-1" + cmakeFlags+=" -DKDE_INSTALL_DBUSINTERFACEDIR=${!outputBin}/share/dbus-1/interfaces" + cmakeFlags+=" -DKDE_INSTALL_DBUSSERVICEDIR=${!outputBin}/share/dbus-1/services" + cmakeFlags+=" -DKDE_INSTALL_DBUSSYSTEMSERVICEDIR=${!outputBin}/share/dbus-1/system-services" + cmakeFlags+=" -DKDE_INSTALL_SYSCONFDIR=${!outputBin}/etc" + cmakeFlags+=" -DKDE_INSTALL_CONFDIR=${!outputBin}/etc/xdg" + cmakeFlags+=" -DKDE_INSTALL_AUTOSTARTDIR=${!outputBin}/etc/xdg/autostart" } preConfigureHooks+=(_ecmConfig) From aaf612e833e6813245dd1c913b2a121fcfca3e06 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 16:26:05 -0500 Subject: [PATCH 04/18] kdeDerivation: don't fail by default on library-only packages --- pkgs/development/libraries/kde-frameworks/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index d5164297161a..5962c16860db 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -24,7 +24,7 @@ let let in stdenv.mkDerivation (args // { - outputs = args.outputs or [ "dev" "out" "bin" ]; + outputs = args.outputs or [ "dev" "out" ]; propagatedUserEnvPkgs = builtins.map lib.getBin (args.propagatedBuildInputs or []); From 22bc6f01cfaa86953802060138128a2783781b4d Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:07:06 -0500 Subject: [PATCH 05/18] kdeEnv: use package version, not ecm version --- pkgs/development/libraries/kde-frameworks/default.nix | 1 - pkgs/development/libraries/kde-frameworks/kde-env.nix | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index 5962c16860db..bf27d52dceb5 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -56,7 +56,6 @@ let kdeEnv = import ./kde-env.nix { inherit (pkgs) stdenv lib; inherit (pkgs.xorg) lndir; - inherit ecmNoHooks; }; kdeWrapper = import ./kde-wrapper.nix { diff --git a/pkgs/development/libraries/kde-frameworks/kde-env.nix b/pkgs/development/libraries/kde-frameworks/kde-env.nix index f4ad528454b2..c77ff49bfeaf 100644 --- a/pkgs/development/libraries/kde-frameworks/kde-env.nix +++ b/pkgs/development/libraries/kde-frameworks/kde-env.nix @@ -1,14 +1,11 @@ -{ stdenv, lib, lndir, ecmNoHooks }: +{ stdenv, lib, lndir }: -name: pkgs: +drv: pkgs: -let - inherit (builtins.parseDrvName ecmNoHooks.name) version; -in stdenv.mkDerivation { - name = "kde-env-${name}"; + name = "kde-env-${drv.name}"; nativeBuildInputs = [ lndir ]; - propagatedUserEnvPkgs = builtins.map lib.getBin pkgs; + propagatedUserEnvPkgs = builtins.map lib.getBin ([drv] ++ pkgs); unpackPhase = "true"; configurePhase = "runHook preConfigure; runHook postConfigure"; buildPhase = "true"; From d1d38f2888ab63e83ee412a526e017a91a1b57ba Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:07:19 -0500 Subject: [PATCH 06/18] kdeWrapper: include wrappers in path --- pkgs/development/libraries/kde-frameworks/kde-wrapper.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix index 3d0c104c9053..ea4d5acfa3b4 100644 --- a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix +++ b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix @@ -5,7 +5,7 @@ drv: { targets, paths }: let - env = kdeEnv drv.name ([ drv ] ++ paths); + env = kdeEnv drv paths; in stdenv.mkDerivation { inherit (drv) name; @@ -25,7 +25,7 @@ stdenv.mkDerivation { if [ -a "$drv/$t" ]; then makeWrapper "$drv/$t" "$out/$t" \ --argv0 '"$0"' \ - --suffix PATH : "$env/bin" \ + --suffix PATH : "$out/bin:$env/bin" \ --prefix XDG_CONFIG_DIRS : "$env/etc/xdg" \ --prefix XDG_DATA_DIRS : "$env/share" \ --set QML_IMPORT_PATH "$env/lib/qt5/imports" \ From f7d98785d5be667fb535f7f3325b85b53ec43270 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:10:30 -0500 Subject: [PATCH 07/18] breeze-icons: don't propagate qtsvg build input breeze-icons does not have a separate dev output, so this pulls qtsvg.dev into the closure. --- pkgs/development/libraries/kde-frameworks/breeze-icons.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix index bf6df87a9720..c87ba75b2b46 100644 --- a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix +++ b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix @@ -5,6 +5,6 @@ kdeFramework { meta = { maintainers = [ lib.maintainers.ttuegel ]; }; outputs = [ "out" ]; nativeBuildInputs = [ ecm ]; - propagatedBuildInputs = [ qtsvg ]; + buildInputs = [ qtsvg ]; propagatedUserEnvPkgs = [ qtsvg.out ]; } From ab58794838d33b4426b81f2887d64f40e31fdf49 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:25:29 -0500 Subject: [PATCH 08/18] kdeWrapper: assume empty path list by default --- pkgs/development/libraries/kde-frameworks/kde-wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix index ea4d5acfa3b4..95f9cdcecb77 100644 --- a/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix +++ b/pkgs/development/libraries/kde-frameworks/kde-wrapper.nix @@ -2,7 +2,7 @@ drv: -{ targets, paths }: +{ targets, paths ? [] }: let env = kdeEnv drv paths; From 425f9be1c8c56f7f9bc4beff067f492940eafa4e Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:25:46 -0500 Subject: [PATCH 09/18] ark: use kdeWrapper --- .../kde-5/applications/ark/default.nix | 53 +++++++++++-------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/ark/default.nix b/pkgs/desktops/kde-5/applications/ark/default.nix index 503ea6d8cfcf..249027570663 100644 --- a/pkgs/desktops/kde-5/applications/ark/default.nix +++ b/pkgs/desktops/kde-5/applications/ark/default.nix @@ -1,7 +1,7 @@ { - kdeApp, lib, + kdeApp, lib, kdeWrapper, - ecm, kdoctools, makeQtWrapper, + ecm, kdoctools, makeWrapper, karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, khtml, kio, kservice, kpty, kwidgetsaddons, libarchive, @@ -10,26 +10,33 @@ p7zip, unrar, unzipNLS, zip }: -kdeApp { - name = "ark"; - nativeBuildInputs = [ - ecm kdoctools makeQtWrapper - ]; - propagatedBuildInputs = [ - khtml ki18n kio karchive kconfig kcrash kdbusaddons kiconthemes kservice - kpty kwidgetsaddons libarchive - ]; - postInstall = - let - PATH = lib.makeBinPath [ - p7zip unrar unzipNLS zip +let + unwrapped = + kdeApp { + name = "ark"; + nativeBuildInputs = [ + ecm kdoctools makeWrapper ]; - in '' - wrapQtProgram "$out/bin/ark" \ - --prefix PATH : "${PATH}" - ''; - meta = { - license = with lib.licenses; [ gpl2 lgpl3 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; + propagatedBuildInputs = [ + khtml ki18n kio karchive kconfig kcrash kdbusaddons kiconthemes kservice + kpty kwidgetsaddons libarchive + ]; + postInstall = + let + PATH = lib.makeBinPath [ + p7zip unrar unzipNLS zip + ]; + in '' + wrapProgram "$out/bin/ark" \ + --prefix PATH : "${PATH}" + ''; + meta = { + license = with lib.licenses; [ gpl2 lgpl3 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + }; +in +kdeWrapper unwrapped +{ + targets = [ "bin/ark" ]; } From 0206373fb2cee04794566c27ccc919cf5ee1b0ac Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:27:03 -0500 Subject: [PATCH 10/18] filelight: use kdeWrapper --- .../desktops/kde-5/applications/filelight.nix | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/filelight.nix b/pkgs/desktops/kde-5/applications/filelight.nix index 523c236ba267..acc5808b4a34 100644 --- a/pkgs/desktops/kde-5/applications/filelight.nix +++ b/pkgs/desktops/kde-5/applications/filelight.nix @@ -1,20 +1,21 @@ { - kdeApp, lib, - ecm, kdoctools, makeQtWrapper, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, kio, kparts, kxmlgui, qtscript, solid }: -kdeApp { - name = "filelight"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = with lib.maintainers; [ fridh vcunat ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - kio kparts kxmlgui qtscript solid - ]; - postInstall = '' - wrapQtProgram "$out/bin/filelight" - ''; -} +let + unwrapped = + kdeApp { + name = "filelight"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = with lib.maintainers; [ fridh vcunat ]; + }; + nativeBuildInputs = [ ecm kdoctools ]; + propagatedBuildInputs = [ + kio kparts kxmlgui qtscript solid + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/filelight" ]; } From e824741a2dbf9aec434e66aa5795fd7bdf37ac30 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:28:00 -0500 Subject: [PATCH 11/18] gwenview: use kdeWrapper --- pkgs/desktops/kde-5/applications/gwenview.nix | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/gwenview.nix b/pkgs/desktops/kde-5/applications/gwenview.nix index e2b2fa014a94..66df17f2e447 100644 --- a/pkgs/desktops/kde-5/applications/gwenview.nix +++ b/pkgs/desktops/kde-5/applications/gwenview.nix @@ -1,21 +1,23 @@ { - kdeApp, lib, - ecm, kdoctools, makeQtWrapper, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, baloo, exiv2, kactivities, kdelibs4support, kio, lcms2, phonon, qtsvg, qtx11extras }: -kdeApp { - name = "gwenview"; - meta = { - license = with lib.licenses; [ gpl2 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - baloo kactivities kdelibs4support kio qtx11extras exiv2 lcms2 phonon qtsvg - ]; - postInstall = '' - wrapQtProgram "$out/bin/gwenview" - ''; -} +let + unwrapped = + kdeApp { + name = "gwenview"; + meta = { + license = with lib.licenses; [ gpl2 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ ecm kdoctools ]; + propagatedBuildInputs = [ + baloo kactivities kdelibs4support kio qtx11extras exiv2 lcms2 phonon + qtsvg + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/gwenview" ]; } From f66b4ca61d7c95dca527244cc34265eb1a0b40c3 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:29:25 -0500 Subject: [PATCH 12/18] kate: use kdeWrapper --- pkgs/desktops/kde-5/applications/kate.nix | 39 ++++++++++++----------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/kate.nix b/pkgs/desktops/kde-5/applications/kate.nix index 4459dea80638..738266e8df7e 100644 --- a/pkgs/desktops/kde-5/applications/kate.nix +++ b/pkgs/desktops/kde-5/applications/kate.nix @@ -1,26 +1,27 @@ { - kdeApp, lib, makeQtWrapper, ecm, kdoctools, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, kactivities, kconfig, kcrash, kguiaddons, kiconthemes, ki18n, kinit, kjobwidgets, kio, kparts, ktexteditor, kwindowsystem, kxmlgui, kdbusaddons, kwallet, plasma-framework, kitemmodels, knotifications, qtscript, threadweaver, knewstuff, libgit2 }: -kdeApp { - name = "kate"; - meta = { - license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - kactivities ki18n kio ktexteditor kwindowsystem plasma-framework qtscript - kconfig kcrash kguiaddons kiconthemes kinit kjobwidgets kparts kxmlgui - kdbusaddons kwallet kitemmodels knotifications threadweaver knewstuff - libgit2 - ]; - postInstall = '' - wrapQtProgram "$out/bin/kate" - wrapQtProgram "$out/bin/kwrite" - ''; -} +let + unwrapped = + kdeApp { + name = "kate"; + meta = { + license = with lib.licenses; [ gpl3 lgpl3 lgpl2 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ ecm 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 unwrapped { targets = [ "bin/kate" "bin/kwrite" ]; } From 6db7ef73b62c17ed2e3fadc0d85116567299f89f Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:31:49 -0500 Subject: [PATCH 13/18] kcalc: use kdeWrapper --- pkgs/desktops/kde-5/applications/kcalc.nix | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/kcalc.nix b/pkgs/desktops/kde-5/applications/kcalc.nix index ca1254e69740..f6d87e3e6e97 100644 --- a/pkgs/desktops/kde-5/applications/kcalc.nix +++ b/pkgs/desktops/kde-5/applications/kcalc.nix @@ -1,20 +1,21 @@ { - kdeApp, lib, makeQtWrapper, kdoctools, - ecm, kconfig, kconfigwidgets, kguiaddons, kinit, - knotifications, gmp + kdeApp, lib, kdeWrapper, + ecm, kdoctools, + kconfig, kconfigwidgets, kguiaddons, kinit, knotifications, gmp }: -kdeApp { - name = "kcalc"; - meta = { - license = with lib.licenses; [ gpl2 ]; - maintainers = [ lib.maintainers.fridh ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - gmp kconfig kconfigwidgets kguiaddons kinit knotifications - ]; - postInstall = '' - wrapQtProgram "$out/bin/kcalc" - ''; -} +let + unwrapped = + kdeApp { + name = "kcalc"; + meta = { + license = with lib.licenses; [ gpl2 ]; + maintainers = [ lib.maintainers.fridh ]; + }; + nativeBuildInputs = [ ecm kdoctools ]; + propagatedBuildInputs = [ + gmp kconfig kconfigwidgets kguiaddons kinit knotifications + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/kcalc" ]; } From ee88a01dd5c02ab1f7add3a908a2bd647999d49f Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:32:36 -0500 Subject: [PATCH 14/18] kcolorchooser: use kdeWrapper --- .../kde-5/applications/kcolorchooser.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/kcolorchooser.nix b/pkgs/desktops/kde-5/applications/kcolorchooser.nix index d5e0eff21e4b..45a72a0bbc1b 100644 --- a/pkgs/desktops/kde-5/applications/kcolorchooser.nix +++ b/pkgs/desktops/kde-5/applications/kcolorchooser.nix @@ -1,14 +1,18 @@ { - kdeApp, lib, + kdeApp, lib, kdeWrapper, ecm, ki18n, kwidgetsaddons, kxmlgui }: -kdeApp { - name = "kcolorchooser"; - meta = { - license = with lib.licenses; [ mit ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ ecm ]; - propagatedBuildInputs = [ ki18n kwidgetsaddons kxmlgui ]; -} +let + unwrapped = + kdeApp { + name = "kcolorchooser"; + meta = { + license = with lib.licenses; [ mit ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ ecm ]; + propagatedBuildInputs = [ ki18n kwidgetsaddons kxmlgui ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/kcolorchooser" ]; } From b93b617f181f0dc3b87c14e927c2af6bd94c2d24 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:34:42 -0500 Subject: [PATCH 15/18] khelpcenter: use kdeWrapper --- .../kde-5/applications/khelpcenter.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/khelpcenter.nix b/pkgs/desktops/kde-5/applications/khelpcenter.nix index aab0c051e806..934f13425e8a 100644 --- a/pkgs/desktops/kde-5/applications/khelpcenter.nix +++ b/pkgs/desktops/kde-5/applications/khelpcenter.nix @@ -1,17 +1,19 @@ { - kdeApp, ecm, kdoctools, makeQtWrapper, + kdeApp, kdeWrapper, + ecm, kdoctools, grantlee, kconfig, kcoreaddons, kdbusaddons, ki18n, kinit, kcmutils, kdelibs4support, khtml, kservice, xapian }: -kdeApp { - name = "khelpcenter"; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - buildInputs = [ - grantlee kdelibs4support khtml ki18n kconfig kcoreaddons kdbusaddons kinit - kcmutils kservice xapian - ]; - postInstall = '' - wrapQtProgram "$out/bin/khelpcenter" - ''; -} +let + unwrapped = + kdeApp { + name = "khelpcenter"; + nativeBuildInputs = [ ecm kdoctools ]; + buildInputs = [ + grantlee kdelibs4support khtml ki18n kconfig kcoreaddons kdbusaddons + kinit kcmutils kservice xapian + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/khelpcenter" ]; } From 4805d008e4333f0e9348ce52a8867352b47a2690 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:35:49 -0500 Subject: [PATCH 16/18] kompare: use kdeWrapper --- pkgs/desktops/kde-5/applications/kompare.nix | 29 ++++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/kompare.nix b/pkgs/desktops/kde-5/applications/kompare.nix index de2dd9338a2e..3b2143af615c 100644 --- a/pkgs/desktops/kde-5/applications/kompare.nix +++ b/pkgs/desktops/kde-5/applications/kompare.nix @@ -1,19 +1,18 @@ { - kdeApp, lib, ecm, kdoctools, makeQtWrapper, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, kparts, ktexteditor, kwidgetsaddons, libkomparediff2 }: -kdeApp { - name = "kompare"; - meta = { - license = with lib.licenses; [ gpl2 ]; - }; - - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - - propagatedBuildInputs = [ kparts ktexteditor kwidgetsaddons libkomparediff2 ]; - - postInstall = '' - wrapQtProgram "$out/bin/kompare" - ''; -} +let + unwrapped = + kdeApp { + name = "kompare"; + meta = { license = with lib.licenses; [ gpl2 ]; }; + nativeBuildInputs = [ ecm kdoctools ]; + propagatedBuildInputs = [ + kparts ktexteditor kwidgetsaddons libkomparediff2 + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/kompare" ]; } From 4e5dfd0d2a5a38c7e3580daa9adcad8d1265ce89 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:38:39 -0500 Subject: [PATCH 17/18] konsole: use kdeWrapper --- pkgs/desktops/kde-5/applications/konsole.nix | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/konsole.nix b/pkgs/desktops/kde-5/applications/konsole.nix index 1d12c671fa8e..bf3a497fefaa 100644 --- a/pkgs/desktops/kde-5/applications/konsole.nix +++ b/pkgs/desktops/kde-5/applications/konsole.nix @@ -1,25 +1,27 @@ { - kdeApp, lib, - ecm, kdoctools, makeQtWrapper, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kguiaddons, ki18n, kiconthemes, kinit, kdelibs4support, kio, knotifications, knotifyconfig, kparts, kpty, kservice, ktextwidgets, kwidgetsaddons, kwindowsystem, kxmlgui, qtscript }: -kdeApp { - name = "konsole"; - meta = { - license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; - maintainers = [ lib.maintainers.ttuegel ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - kdelibs4support ki18n kwindowsystem qtscript kbookmarks kcompletion kconfig - kconfigwidgets kcoreaddons kguiaddons kiconthemes kinit kio knotifications - knotifyconfig kparts kpty kservice ktextwidgets kwidgetsaddons kxmlgui - ]; - postInstall = '' - wrapQtProgram "$out/bin/konsole" - ''; -} +let + unwrapped = + kdeApp { + name = "konsole"; + meta = { + license = with lib.licenses; [ gpl2 lgpl21 fdl12 ]; + maintainers = [ lib.maintainers.ttuegel ]; + }; + nativeBuildInputs = [ ecm 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 unwrapped { targets = [ "bin/konsole" ]; } From 551f26fc71c7dd82751d9e5fda27caff1d3bc15c Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 30 Jul 2016 17:40:00 -0500 Subject: [PATCH 18/18] spectacle: use kdeWrapper --- .../desktops/kde-5/applications/spectacle.nix | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/kde-5/applications/spectacle.nix b/pkgs/desktops/kde-5/applications/spectacle.nix index 2665d840c387..26faea2678a9 100644 --- a/pkgs/desktops/kde-5/applications/spectacle.nix +++ b/pkgs/desktops/kde-5/applications/spectacle.nix @@ -1,20 +1,20 @@ { - kdeApp, lib, ecm, kdoctools, makeQtWrapper, + kdeApp, lib, kdeWrapper, + ecm, kdoctools, kconfig, kcoreaddons, kdbusaddons, kdeclarative, ki18n, kio, knotifications, kscreen, kwidgetsaddons, kwindowsystem, kxmlgui, libkipi, xcb-util-cursor }: -kdeApp { - name = "spectacle"; - meta = with lib; { - maintainers = with maintainers; [ ttuegel ]; - }; - nativeBuildInputs = [ ecm kdoctools makeQtWrapper ]; - propagatedBuildInputs = [ - kconfig kcoreaddons kdbusaddons kdeclarative ki18n kio knotifications - kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi xcb-util-cursor - ]; - postInstall = '' - wrapQtProgram "$out/bin/spectacle" - ''; -} +let + unwrapped = + kdeApp { + name = "spectacle"; + meta = with lib; { maintainers = with maintainers; [ ttuegel ]; }; + nativeBuildInputs = [ ecm kdoctools ]; + propagatedBuildInputs = [ + kconfig kcoreaddons kdbusaddons kdeclarative ki18n kio knotifications + kscreen kwidgetsaddons kwindowsystem kxmlgui libkipi xcb-util-cursor + ]; + }; +in +kdeWrapper unwrapped { targets = [ "bin/spectacle" ]; }