2 mkDerivation, lib, writeScript,
3 extra-cmake-modules, kdoctools,
4 kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework
7 let inherit (lib) getLib; in
11 outputs = [ "out" "dev" ];
12 nativeBuildInputs = [ extra-cmake-modules kdoctools ];
14 kconfig kcrash ki18n kio kservice kwindowsystem
17 ./0002-start_kdeinit-path.patch
18 ./0003-kdeinit-extra-libs.patch
19 ./0004-start_kdeinit-environ-hard-limit.patch
22 ''-DNIXPKGS_KF5_KIOCORE=\"${getLib kio}/lib/libKF5KIOCore.so.5\"''
23 ''-DNIXPKGS_KF5_PARTS=\"${getLib kparts}/lib/libKF5Parts.so.5\"''
24 ''-DNIXPKGS_KF5_PLASMA=\"${getLib plasma-framework}/lib/libKF5Plasma.so.5\"''
26 setupHook = writeScript "setup-hook.sh" ''
27 kinitFixupOutputHook() {
28 if [ $prefix != ''${!outputBin} ] && [ -d $prefix/lib ]; then
29 mkdir -p ''${!outputBin}/lib
30 find $prefix/lib -maxdepth 1 -name 'libkdeinit5_*.so' -exec ln -s \{\} ''${!outputBin}/lib \;
31 rmdir --ignore-fail-on-non-empty ''${!outputBin}/lib
35 fixupOutputHooks+=(kinitFixupOutputHook)