Merge branch 'qt-min-user-env'
This commit is contained in:
commit
2eb6300b87
@ -50,13 +50,13 @@ in
|
||||
security.setuidOwners = [
|
||||
{
|
||||
program = "kcheckpass";
|
||||
source = "${kde5.plasma-workspace}/lib/libexec/kcheckpass";
|
||||
source = "${kde5.plasma-workspace.out}/lib/libexec/kcheckpass";
|
||||
owner = "root";
|
||||
setuid = true;
|
||||
}
|
||||
{
|
||||
program = "start_kdeinit_wrapper";
|
||||
source = "${kde5.plasma-workspace}/lib/libexec/kf5/start_kdeinit_wrapper";
|
||||
program = "start_kdeinit";
|
||||
source = "${kde5.kinit.out}/lib/libexec/kf5/start_kdeinit";
|
||||
owner = "root";
|
||||
setuid = true;
|
||||
}
|
||||
@ -65,10 +65,50 @@ in
|
||||
environment.systemPackages =
|
||||
[
|
||||
kde5.frameworkintegration
|
||||
kde5.kactivities
|
||||
kde5.kauth
|
||||
kde5.kcmutils
|
||||
kde5.kconfig
|
||||
kde5.kconfigwidgets
|
||||
kde5.kcoreaddons
|
||||
kde5.kdbusaddons
|
||||
kde5.kdeclarative
|
||||
kde5.kded
|
||||
kde5.kdesu
|
||||
kde5.kdnssd
|
||||
kde5.kemoticons
|
||||
kde5.kfilemetadata
|
||||
kde5.kglobalaccel
|
||||
kde5.kguiaddons
|
||||
kde5.kiconthemes
|
||||
kde5.kidletime
|
||||
kde5.kimageformats
|
||||
kde5.kinit
|
||||
kde5.kio
|
||||
kde5.kjobwidgets
|
||||
kde5.knewstuff
|
||||
kde5.knotifications
|
||||
kde5.knotifyconfig
|
||||
kde5.kpackage
|
||||
kde5.kparts
|
||||
kde5.kpeople
|
||||
kde5.krunner
|
||||
kde5.kservice
|
||||
kde5.ktextwidgets
|
||||
kde5.kwallet
|
||||
kde5.kwayland
|
||||
kde5.kwidgetsaddons
|
||||
kde5.kxmlgui
|
||||
kde5.kxmlrpcclient
|
||||
kde5.plasma-framework
|
||||
kde5.solid
|
||||
kde5.sonnet
|
||||
kde5.threadweaver
|
||||
|
||||
kde5.breeze
|
||||
kde5.kactivitymanagerd
|
||||
kde5.kde-cli-tools
|
||||
kde5.kdecoration
|
||||
kde5.kdeplasma-addons
|
||||
kde5.kgamma5
|
||||
kde5.khelpcenter
|
||||
@ -76,12 +116,16 @@ in
|
||||
kde5.kinfocenter
|
||||
kde5.kmenuedit
|
||||
kde5.kscreen
|
||||
kde5.kscreenlocker
|
||||
kde5.ksysguard
|
||||
kde5.kwayland
|
||||
kde5.kwin
|
||||
kde5.kwrited
|
||||
kde5.libkscreen
|
||||
kde5.libksysguard
|
||||
kde5.milou
|
||||
kde5.oxygen
|
||||
kde5.plasma-integration
|
||||
kde5.polkit-kde-agent
|
||||
kde5.systemsettings
|
||||
|
||||
|
@ -1,44 +1,33 @@
|
||||
{ kdeApp
|
||||
, lib
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, karchive
|
||||
, kconfig
|
||||
, kcrash
|
||||
, kdbusaddons
|
||||
, ki18n
|
||||
, kiconthemes
|
||||
, khtml
|
||||
, kio
|
||||
, kservice
|
||||
, kpty
|
||||
, kwidgetsaddons
|
||||
, libarchive
|
||||
, p7zip
|
||||
, unrar
|
||||
, unzipNLS
|
||||
, zip
|
||||
}:
|
||||
{
|
||||
kdeApp, lib,
|
||||
|
||||
let PATH = lib.makeBinPath [
|
||||
p7zip unrar unzipNLS zip
|
||||
];
|
||||
in
|
||||
extra-cmake-modules, kdoctools, makeQtWrapper,
|
||||
|
||||
karchive, kconfig, kcrash, kdbusaddons, ki18n, kiconthemes, khtml, kio,
|
||||
kservice, kpty, kwidgetsaddons, libarchive,
|
||||
|
||||
# Archive tools
|
||||
p7zip, unrar, unzipNLS, zip
|
||||
}:
|
||||
|
||||
kdeApp {
|
||||
name = "ark";
|
||||
nativeBuildInputs = [
|
||||
extra-cmake-modules
|
||||
kdoctools
|
||||
extra-cmake-modules kdoctools makeQtWrapper
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
khtml ki18n kio karchive kconfig kcrash kdbusaddons kiconthemes kservice
|
||||
kpty kwidgetsaddons libarchive
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/ark" \
|
||||
--prefix PATH : "${PATH}"
|
||||
'';
|
||||
postInstall =
|
||||
let
|
||||
PATH = lib.makeBinPath [
|
||||
p7zip unrar unzipNLS zip
|
||||
];
|
||||
in ''
|
||||
wrapQtProgram "$out/bin/ark" \
|
||||
--prefix PATH : "${PATH}"
|
||||
'';
|
||||
meta = {
|
||||
license = with lib.licenses; [ gpl2 lgpl3 ];
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
|
@ -1,22 +1,15 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, kauth, kconfig
|
||||
, kcoreaddons, kcrash, kdbusaddons, kfilemetadata, ki18n, kidletime
|
||||
, kio, lmdb, makeQtWrapper, qtbase, solid
|
||||
, kio, lmdb, qtbase, solid
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "baloo";
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [
|
||||
kauth kconfig kcoreaddons kcrash kdbusaddons kfilemetadata ki18n kio
|
||||
kidletime lmdb qtbase solid
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/baloo_file"
|
||||
wrapQtProgram "$out/bin/baloo_file_extractor"
|
||||
wrapQtProgram "$out/bin/balooctl"
|
||||
wrapQtProgram "$out/bin/baloosearch"
|
||||
wrapQtProgram "$out/bin/balooshow"
|
||||
'';
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
};
|
||||
|
@ -1,22 +1,31 @@
|
||||
_ecmSetXdgDirs() {
|
||||
addToSearchPathOnce XDG_DATA_DIRS "$1/share"
|
||||
addToSearchPathOnce XDG_CONFIG_DIRS "$1/etc/xdg"
|
||||
addToSearchPathOnce NIX_WRAP_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" \
|
||||
"info" \
|
||||
"kconf_update" \
|
||||
"kservices5" \
|
||||
"kservicetypes5" \
|
||||
"knotifications5" \
|
||||
"applications" \
|
||||
"desktop-directories" \
|
||||
"kxmlgui5" \
|
||||
"locale" \
|
||||
"man" \
|
||||
"mime" \
|
||||
"dbus-1" \
|
||||
"interfaces" \
|
||||
"services" \
|
||||
"system-services" )
|
||||
"polkit-1" \
|
||||
"sounds" \
|
||||
"templates" \
|
||||
"wallpapers" \
|
||||
)
|
||||
|
||||
_ecmPropagateNative() {
|
||||
for dir in ${_ecmSharePaths[@]}; do
|
||||
@ -24,7 +33,7 @@ _ecmPropagateNative() {
|
||||
propagateOnce propagatedNativeBuildInputs "$1"
|
||||
if [ -z "$crossConfig" ]; then
|
||||
propagateOnce propagatedUserEnvPkgs "$1"
|
||||
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
||||
addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
@ -38,7 +47,7 @@ _ecmPropagate() {
|
||||
if [ -d "$1/share/$dir" ]; then
|
||||
propagateOnce propagatedBuildInputs "$1"
|
||||
propagateOnce propagatedUserEnvPkgs "$1"
|
||||
addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share"
|
||||
addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@ -1,16 +1,9 @@
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, makeQtWrapper
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kconfig";
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kreadconfig5"
|
||||
wrapQtProgram "$out/bin/kwriteconfig5"
|
||||
'';
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
};
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
}
|
||||
|
@ -1,15 +1,14 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, kauth, kcodecs, kconfig
|
||||
, kdoctools, kguiaddons, ki18n, kwidgetsaddons, makeQtWrapper
|
||||
, kdoctools, kguiaddons, ki18n, kwidgetsaddons
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kconfigwidgets";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [ kauth kconfig kcodecs kguiaddons ki18n kwidgetsaddons ];
|
||||
patches = [ ./0001-qdiriterator-follow-symlinks.patch ];
|
||||
postInstall = ''
|
||||
moveToOutput "bin/preparetips5" "$dev"
|
||||
wrapQtProgram "$dev/bin/preparetips5"
|
||||
'';
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ kdeFramework, lib, makeQtWrapper
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, shared_mime_info
|
||||
}:
|
||||
@ -6,9 +6,6 @@
|
||||
kdeFramework {
|
||||
name = "kcoreaddons";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ shared_mime_info ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/desktoptojson"
|
||||
'';
|
||||
}
|
||||
|
@ -1,17 +1,11 @@
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, makeQtWrapper
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kdbusaddons";
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ qtx11extras ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kquitapp5"
|
||||
'';
|
||||
meta = {
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
};
|
||||
}
|
||||
|
@ -1,18 +1,15 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, epoxy, kconfig
|
||||
, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio, kpackage
|
||||
, kwidgetsaddons, kwindowsystem, makeQtWrapper, pkgconfig
|
||||
, kwidgetsaddons, kwindowsystem, pkgconfig
|
||||
, qtdeclarative
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kdeclarative";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [
|
||||
epoxy kconfig kglobalaccel kguiaddons ki18n kiconthemes kio kpackage
|
||||
kwidgetsaddons kwindowsystem qtdeclarative
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kpackagelauncherqml"
|
||||
'';
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ kdeFramework, lib, makeQtWrapper
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, kcompletion
|
||||
, kconfig
|
||||
@ -18,12 +18,9 @@
|
||||
kdeFramework {
|
||||
name = "kdesignerplugin";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
kcompletion kconfig kconfigwidgets kcoreaddons kiconthemes kio
|
||||
kitemviews kplotting ktextwidgets kwidgetsaddons kxmlgui sonnet
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kgendesignerplugin"
|
||||
'';
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, docbook_xml_dtd_45
|
||||
, docbook5_xsl, karchive, ki18n, makeQtWrapper, perl, perlPackages
|
||||
, docbook5_xsl, karchive, ki18n, perl, perlPackages
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
@ -7,7 +7,7 @@ kdeFramework {
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ karchive ki18n ];
|
||||
propagatedNativeBuildInputs = [ makeQtWrapper perl perlPackages.URI ];
|
||||
propagatedNativeBuildInputs = [ perl perlPackages.URI ];
|
||||
cmakeFlags = [
|
||||
"-DDocBookXML4_DTD_DIR=${docbook_xml_dtd_45}/xml/dtd/docbook"
|
||||
"-DDocBookXSL_DIR=${docbook5_xsl}/xml/xsl/docbook"
|
||||
|
@ -5,18 +5,14 @@
|
||||
, kcrash
|
||||
, kdbusaddons
|
||||
, kwindowsystem
|
||||
, makeQtWrapper
|
||||
, qtx11extras
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kglobalaccel";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [
|
||||
kconfig kcoreaddons kcrash kdbusaddons kwindowsystem qtx11extras
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kglobalaccel5"
|
||||
'';
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ kdeFramework, lib, copyPathsToStore
|
||||
, extra-cmake-modules, makeQtWrapper
|
||||
, extra-cmake-modules
|
||||
, karchive, kconfigwidgets, ki18n, breeze-icons, kitemviews, qtsvg
|
||||
}:
|
||||
|
||||
@ -7,9 +7,6 @@ kdeFramework {
|
||||
name = "kiconthemes";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ breeze-icons kconfigwidgets karchive ki18n kitemviews qtsvg ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kiconfinder5"
|
||||
'';
|
||||
}
|
||||
|
@ -1,13 +1,15 @@
|
||||
{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kconfig, kcrash
|
||||
, kdoctools, ki18n, kio, kservice, kwindowsystem, libcap
|
||||
{
|
||||
kdeFramework, lib, copyPathsToStore,
|
||||
extra-cmake-modules, kdoctools,
|
||||
kconfig, kcrash, ki18n, kio, kservice, kwindowsystem
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kinit";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools libcap.out ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
kconfig kcrash ki18n kio kservice kwindowsystem libcap
|
||||
kconfig kcrash ki18n kio kservice kwindowsystem
|
||||
];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: kinit-5.21.0/src/kdeinit/kinit.cpp
|
||||
Index: kinit-5.24.0/src/kdeinit/kinit.cpp
|
||||
===================================================================
|
||||
--- kinit-5.21.0.orig/src/kdeinit/kinit.cpp
|
||||
+++ kinit-5.21.0/src/kdeinit/kinit.cpp
|
||||
@@ -657,19 +657,16 @@ static pid_t launch(int argc, const char
|
||||
--- kinit-5.24.0.orig/src/kdeinit/kinit.cpp
|
||||
+++ kinit-5.24.0/src/kdeinit/kinit.cpp
|
||||
@@ -672,19 +672,16 @@ static pid_t launch(int argc, const char
|
||||
|
||||
if (!libpath.isEmpty()) {
|
||||
if (libpath_relative) {
|
||||
|
@ -1 +1,2 @@
|
||||
kinit-libpath.patch
|
||||
start_kdeinit-path.patch
|
||||
|
@ -0,0 +1,13 @@
|
||||
Index: kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
===================================================================
|
||||
--- kinit-5.24.0.orig/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
+++ kinit-5.24.0/src/start_kdeinit/start_kdeinit_wrapper.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-#define EXECUTE CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit"
|
||||
+#define EXECUTE "/var/setuid-wrappers/start_kdeinit"
|
||||
|
||||
#if KDEINIT_OOM_PROTECT
|
||||
|
@ -3,14 +3,14 @@
|
||||
, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons
|
||||
, kdbusaddons, kdoctools, ki18n, kiconthemes, kitemviews
|
||||
, kjobwidgets, knotifications, kservice, ktextwidgets, kwallet
|
||||
, kwidgetsaddons, kwindowsystem, kxmlgui, makeQtWrapper
|
||||
, kwidgetsaddons, kwindowsystem, kxmlgui
|
||||
, qtscript, qtx11extras, solid
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kio";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
acl karchive kbookmarks kcompletion kconfig kconfigwidgets kcoreaddons
|
||||
kdbusaddons ki18n kiconthemes kitemviews kjobwidgets knotifications kservice
|
||||
@ -18,10 +18,4 @@ kdeFramework {
|
||||
qtx11extras
|
||||
];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kcookiejar5"
|
||||
wrapQtProgram "$out/bin/ktelnetservice5"
|
||||
wrapQtProgram "$out/bin/ktrash5"
|
||||
wrapQtProgram "$out/bin/protocoltojson"
|
||||
'';
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, makeQtWrapper
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kjs";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kjs5"
|
||||
'';
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
}
|
||||
|
@ -1,14 +1,10 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, kdoctools, ki18n, kjs
|
||||
, makeQtWrapper, qtsvg
|
||||
, qtsvg
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kjsembed";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [ ki18n kjs qtsvg ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kjscmd5"
|
||||
wrapQtProgram "$out/bin/kjsconsole"
|
||||
'';
|
||||
}
|
||||
|
@ -5,16 +5,12 @@
|
||||
, kcoreaddons
|
||||
, kdoctools
|
||||
, ki18n
|
||||
, makeQtWrapper
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kpackage";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [ karchive kconfig kcoreaddons ki18n ];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kpackagetool5"
|
||||
'';
|
||||
}
|
||||
|
@ -1,43 +0,0 @@
|
||||
addServicePkg() {
|
||||
local propagated
|
||||
for dir in "share/kservices5" "share/kservicetypes5"; do
|
||||
if [[ -d "$1/$dir" ]]; then
|
||||
propagated=
|
||||
for pkg in $propagatedBuildInputs; do
|
||||
if [[ "z$pkg" == "z$1" ]]; then
|
||||
propagated=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z $propagated ]]; then
|
||||
propagatedBuildInputs="$propagatedBuildInputs $1"
|
||||
fi
|
||||
|
||||
propagated=
|
||||
for pkg in $propagatedUserEnvPkgs; do
|
||||
if [[ "z$pkg" == "z$1" ]]; then
|
||||
propagated=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z $propagated ]]; then
|
||||
propagatedUserEnvPkgs="$propagatedUserEnvPkgs $1"
|
||||
fi
|
||||
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
envHooks+=(addServicePkg)
|
||||
|
||||
local propagated
|
||||
for pkg in $propagatedBuildInputs; do
|
||||
if [[ "z$pkg" == "z@out@" ]]; then
|
||||
propagated=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z $propagated ]]; then
|
||||
propagatedBuildInputs="$propagatedBuildInputs @out@"
|
||||
fi
|
@ -1,5 +1,5 @@
|
||||
{ kdeFramework, lib, copyPathsToStore
|
||||
, extra-cmake-modules, makeQtWrapper, perl
|
||||
, extra-cmake-modules, perl
|
||||
, karchive, kconfig, kguiaddons, kiconthemes, kparts
|
||||
, libgit2
|
||||
, qtscript, qtxmlpatterns
|
||||
@ -9,7 +9,7 @@
|
||||
kdeFramework {
|
||||
name = "ktexteditor";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper perl ];
|
||||
nativeBuildInputs = [ extra-cmake-modules perl ];
|
||||
propagatedBuildInputs = [
|
||||
karchive kconfig kguiaddons ki18n kiconthemes kio kparts libgit2 qtscript
|
||||
qtxmlpatterns sonnet
|
||||
|
@ -1,18 +1,14 @@
|
||||
{ kdeFramework, lib, extra-cmake-modules, kconfig, kconfigwidgets
|
||||
, kcoreaddons , kdbusaddons, kdoctools, ki18n, kiconthemes
|
||||
, knotifications , kservice, kwidgetsaddons, kwindowsystem, libgcrypt
|
||||
, makeQtWrapper }:
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "kwallet";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
kconfig kconfigwidgets kcoreaddons kdbusaddons ki18n kiconthemes
|
||||
knotifications kservice kwidgetsaddons kwindowsystem libgcrypt
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/kwalletd5"
|
||||
wrapQtProgram "$out/bin/kwallet-query"
|
||||
'';
|
||||
}
|
||||
|
@ -2,19 +2,16 @@
|
||||
, kconfig, kconfigwidgets, kcoreaddons, kdbusaddons, kdeclarative
|
||||
, kdoctools, kglobalaccel, kguiaddons, ki18n, kiconthemes, kio
|
||||
, knotifications, kpackage, kservice, kwindowsystem, kxmlgui
|
||||
, makeQtWrapper, qtscript, qtx11extras
|
||||
, qtscript, qtx11extras
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "plasma-framework";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
||||
propagatedBuildInputs = [
|
||||
kactivities karchive kconfig kconfigwidgets kcoreaddons kdbusaddons
|
||||
kdeclarative kglobalaccel kguiaddons ki18n kiconthemes kio knotifications
|
||||
kpackage kservice kwindowsystem kxmlgui qtscript qtx11extras
|
||||
];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/plasmapkg2"
|
||||
'';
|
||||
}
|
||||
|
@ -1,15 +1,11 @@
|
||||
{ kdeFramework, lib
|
||||
, extra-cmake-modules
|
||||
, makeQtWrapper
|
||||
, qtdeclarative
|
||||
}:
|
||||
|
||||
kdeFramework {
|
||||
name = "solid";
|
||||
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
||||
nativeBuildInputs = [ extra-cmake-modules makeQtWrapper ];
|
||||
nativeBuildInputs = [ extra-cmake-modules ];
|
||||
propagatedBuildInputs = [ qtdeclarative ];
|
||||
postInstall = ''
|
||||
wrapQtProgram "$out/bin/solid-hardware5"
|
||||
'';
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
{ plasmaPackage, lib, copyPathsToStore
|
||||
, extra-cmake-modules, kdoctools
|
||||
, 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, qtquickcontrols, qtscript, qtx11extras, solid
|
||||
, isocodes, libdbusmenu, libSM, libXcursor, pam, wayland
|
||||
{
|
||||
plasmaPackage, lib, copyPathsToStore,
|
||||
|
||||
extra-cmake-modules, kdoctools,
|
||||
|
||||
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, qtquickcontrols, qtscript, qtx11extras, solid, isocodes,
|
||||
libdbusmenu, libSM, libXcursor, pam, wayland
|
||||
}:
|
||||
|
||||
plasmaPackage {
|
||||
name = "plasma-workspace";
|
||||
|
||||
nativeBuildInputs = [
|
||||
extra-cmake-modules
|
||||
kdoctools
|
||||
extra-cmake-modules kdoctools
|
||||
];
|
||||
buildInputs = [
|
||||
baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative
|
||||
@ -37,21 +39,4 @@ plasmaPackage {
|
||||
rm "$out/lib/libexec/startplasma"
|
||||
rm -r "$out/share/wayland-sessions"
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapQtProgram $out/bin/kcheckrunning
|
||||
wrapQtProgram $out/bin/kcminit
|
||||
wrapQtProgram $out/bin/kcminit_startup
|
||||
wrapQtProgram $out/bin/kdostartupconfig5
|
||||
wrapQtProgram $out/bin/klipper
|
||||
wrapQtProgram $out/bin/krunner
|
||||
wrapQtProgram $out/bin/ksmserver
|
||||
wrapQtProgram $out/bin/ksplashqml
|
||||
wrapQtProgram $out/bin/kstartupconfig5
|
||||
wrapQtProgram $out/bin/kuiserver5
|
||||
wrapQtProgram $out/bin/plasmashell
|
||||
wrapQtProgram $out/bin/plasmawindowed
|
||||
wrapQtProgram $out/bin/systemmonitor
|
||||
wrapQtProgram $out/bin/xembedsniproxy
|
||||
'';
|
||||
}
|
||||
|
@ -1,16 +1,15 @@
|
||||
{ stdenv, lib, runCommand
|
||||
, dbus, qttools, socat
|
||||
, gnugrep, gnused
|
||||
, kconfig, kinit, kservice
|
||||
, plasma-workspace
|
||||
, xmessage, xprop, xsetroot
|
||||
{
|
||||
stdenv, lib, runCommand, dbus, qttools, socat, gnugrep, gnused, kconfig,
|
||||
kinit, kservice, plasma-workspace, xmessage, xprop, xsetroot, qtbase,
|
||||
qtdeclarative, qtgraphicaleffects, qtquickcontrols, qtscript, qtsvg,
|
||||
qtx11extras, qtxmlpatterns
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
env = {
|
||||
inherit (stdenv) shell;
|
||||
paths = builtins.map (pkg: pkg.out or pkg)
|
||||
bins = builtins.map (pkg: pkg.out or pkg)
|
||||
[
|
||||
dbus qttools socat
|
||||
gnugrep gnused
|
||||
@ -18,15 +17,38 @@ let
|
||||
plasma-workspace
|
||||
xmessage xprop xsetroot
|
||||
];
|
||||
libs = builtins.map (pkg: pkg.out or pkg)
|
||||
[
|
||||
qtbase qtdeclarative qtgraphicaleffects qtquickcontrols
|
||||
qtscript qtsvg qtx11extras qtxmlpatterns
|
||||
];
|
||||
};
|
||||
|
||||
in runCommand "startkde" env ''
|
||||
prefix_PATH=
|
||||
for pkg in $paths; do
|
||||
addToSearchPath prefix_PATH "$pkg/bin"
|
||||
addToSearchPath prefix_PATH "$pkg/lib/libexec"
|
||||
addToSearchPath prefix_PATH "$pkg/lib/libexec/kf5"
|
||||
|
||||
# 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
|
||||
substitute ${./startkde.sh} "$out" --subst-var shell --subst-var prefix_PATH
|
||||
|
||||
# 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"
|
||||
''
|
||||
|
@ -1,6 +1,10 @@
|
||||
#!@shell@
|
||||
|
||||
PATH="@prefix_PATH@:$PATH"
|
||||
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@"
|
||||
|
||||
# The KDE icon cache is supposed to update itself
|
||||
# automatically, but it uses the timestamp on the icon
|
||||
@ -73,7 +77,7 @@ kcminputrc Mouse cursorTheme 'breeze_cursors'
|
||||
kcminputrc Mouse cursorSize ''
|
||||
ksplashrc KSplash Theme Breeze
|
||||
ksplashrc KSplash Engine KSplashQML
|
||||
kdeglobals KScreen ScaleFactor 1
|
||||
kdeglobals KScreen ScreenScaleFactors ''
|
||||
kcmfonts General forceFontDPI 0
|
||||
EOF
|
||||
|
||||
@ -153,20 +157,6 @@ xsetroot -cursor_name left_ptr
|
||||
dl=$DESKTOP_LOCKED
|
||||
unset DESKTOP_LOCKED # Don't want it in the environment
|
||||
|
||||
# Make sure that D-Bus is running
|
||||
# D-Bus autolaunch is broken
|
||||
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
|
||||
eval $(dbus-launch --sh-syntax --exit-with-session)
|
||||
fi
|
||||
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?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ksplash_pid=
|
||||
if test -z "$dl"; then
|
||||
# the splashscreen and progress indicator
|
||||
@ -205,6 +195,16 @@ done
|
||||
|
||||
echo 'startkde: Starting up...' 1>&2
|
||||
|
||||
# Make sure that D-Bus is running
|
||||
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?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Mark that full KDE session is running (e.g. Konqueror preloading works only
|
||||
# with full KDE running). The KDE_FULL_SESSION property can be detected by
|
||||
# any X client connected to the same X session, even if not launched
|
||||
@ -251,7 +251,7 @@ if test -n "$PAM_KWALLET5_LOGIN" ; then
|
||||
fi
|
||||
|
||||
# At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
|
||||
ksyncdbusenv
|
||||
dbus-update-activation-environment --systemd --all
|
||||
if test $? -ne 0; then
|
||||
# Startup error
|
||||
echo 'startkde: Could not sync environment to dbus.' 1>&2
|
||||
@ -271,6 +271,8 @@ if test $? -ne 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
qdbus org.kde.KSplash /KSplash org.kde.KSplash.setStage kinit
|
||||
|
||||
# (NixOS) Run kbuildsycoca5 before starting the user session because things
|
||||
# may be missing or moved if they have run nixos-rebuild and it may not be
|
||||
# possible for them to start Konsole to run it manually!
|
||||
|
@ -1,38 +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_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
||||
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
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_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
||||
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_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 XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
||||
export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputLib}/share"
|
||||
export NIX_WRAP_XDG_CONFIG_DIRS="$NIX_WRAP_XDG_CONFIG_DIRS${NIX_WRAP_XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
||||
export NIX_WRAP_XDG_DATA_DIRS="$NIX_WRAP_XDG_DATA_DIRS${NIX_WRAP_XDG_DATA_DIRS:+:}${!outputLib}/share"
|
||||
}
|
||||
|
||||
prePhases+=(_makeQtWrapperSetup)
|
1
pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh
Symbolic link
1
pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../5.6/make-qt-wrapper.sh
|
@ -24,11 +24,10 @@ propagateOnce() {
|
||||
addToSearchPathOnceWithCustomDelimiter ' ' "$@"
|
||||
}
|
||||
|
||||
_qtPropagateRuntimeDependencies() {
|
||||
_qtPropagate() {
|
||||
for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do
|
||||
if [ -d "$1/$dir" ]; then
|
||||
propagateOnce propagatedBuildInputs "$1"
|
||||
propagateOnce propagatedUserEnvPkgs "$1"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -37,7 +36,23 @@ _qtPropagateRuntimeDependencies() {
|
||||
addToSearchPathOnce QML2_IMPORT_PATH "$1/lib/qt5/qml"
|
||||
}
|
||||
|
||||
envHooks+=(_qtPropagateRuntimeDependencies)
|
||||
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
|
||||
@ -50,3 +65,107 @@ if [[ -z "$NIX_QT_PIC" ]]; then
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE${NIX_CFLAGS_COMPILE:+ }-fPIC"
|
||||
export NIX_QT_PIC=1
|
||||
fi
|
||||
|
||||
_qtSetCMakePrefix() {
|
||||
export CMAKE_PREFIX_PATH="$NIX_QT5_TMP${CMAKE_PREFIX_PATH:+:}${CMAKE_PREFIX_PATH}"
|
||||
}
|
||||
|
||||
_qtRmTmp() {
|
||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
||||
rm -fr "$NIX_QT5_TMP"
|
||||
else
|
||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read file; do
|
||||
if [ ! -d "$NIX_QT5_TMP/$file" ]; then
|
||||
rm -f "$NIX_QT5_TMP/$file"
|
||||
fi
|
||||
done
|
||||
|
||||
cat "$NIX_QT5_TMP/nix-support/qt-inputs" | while read dir; do
|
||||
if [ -d "$NIX_QT5_TMP/$dir" ]; then
|
||||
rmdir --ignore-fail-on-non-empty -p "$NIX_QT5_TMP/$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
rm "$NIX_QT5_TMP/nix-support/qt-inputs"
|
||||
fi
|
||||
}
|
||||
|
||||
_qtSetQmakePath() {
|
||||
export PATH="$NIX_QT5_TMP/bin${PATH:+:}$PATH"
|
||||
}
|
||||
|
||||
if [ -z "$NIX_QT5_TMP" ]; then
|
||||
if [ -z "$NIX_QT_SUBMODULE" ]; then
|
||||
NIX_QT5_TMP=$(mktemp -d)
|
||||
else
|
||||
NIX_QT5_TMP=$out
|
||||
fi
|
||||
postInstallHooks+=(_qtRmTmp)
|
||||
|
||||
mkdir -p "$NIX_QT5_TMP/nix-support"
|
||||
for subdir in bin include lib mkspecs share; do
|
||||
mkdir "$NIX_QT5_TMP/$subdir"
|
||||
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" <<EOF
|
||||
[Paths]
|
||||
Prefix = $NIX_QT5_TMP
|
||||
Plugins = lib/qt5/plugins
|
||||
Imports = lib/qt5/imports
|
||||
Qml2Imports = lib/qt5/qml
|
||||
Documentation = share/doc/qt5
|
||||
EOF
|
||||
echo "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
|
||||
|
@ -2,11 +2,11 @@ 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_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
||||
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \
|
||||
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
|
||||
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
|
||||
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
|
||||
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
|
||||
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
@ -16,11 +16,11 @@ makeQtWrapper() {
|
||||
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_CONFIG_DIRS : "$NIX_WRAP_XDG_CONFIG_DIRS" \
|
||||
--prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \
|
||||
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
|
||||
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
|
||||
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
|
||||
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
|
||||
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
@ -29,10 +29,8 @@ _makeQtWrapperSetup() {
|
||||
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 XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
||||
export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputLib}/share"
|
||||
export NIX_WRAP_XDG_CONFIG_DIRS="$NIX_WRAP_XDG_CONFIG_DIRS${NIX_WRAP_XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg"
|
||||
export NIX_WRAP_XDG_DATA_DIRS="$NIX_WRAP_XDG_DATA_DIRS${NIX_WRAP_XDG_DATA_DIRS:+:}${!outputLib}/share"
|
||||
export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share"
|
||||
export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg"
|
||||
}
|
||||
|
||||
prePhases+=(_makeQtWrapperSetup)
|
||||
|
@ -28,7 +28,6 @@ _qtPropagate() {
|
||||
for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do
|
||||
if [ -d "$1/$dir" ]; then
|
||||
propagateOnce propagatedBuildInputs "$1"
|
||||
propagateOnce propagatedUserEnvPkgs "$1"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -43,9 +42,6 @@ _qtPropagateNative() {
|
||||
for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do
|
||||
if [ -d "$1/$dir" ]; then
|
||||
propagateOnce propagatedNativeBuildInputs "$1"
|
||||
if [ -z "$crossConfig" ]; then
|
||||
propagateOnce propagatedUserEnvPkgs "$1"
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user