2016-07-15 19:10:54 +02:00
|
|
|
{
|
2017-05-22 20:49:07 +02:00
|
|
|
mkDerivation, lib, copyPathsToStore, writeScript,
|
2017-02-26 13:49:15 +01:00
|
|
|
extra-cmake-modules, kdoctools,
|
2017-04-23 17:27:31 +02:00
|
|
|
kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework
|
2016-04-21 17:32:21 +02:00
|
|
|
}:
|
|
|
|
|
2017-05-15 19:05:35 +02:00
|
|
|
let inherit (lib) getLib; in
|
|
|
|
|
|
|
|
mkDerivation {
|
2016-04-21 17:32:21 +02:00
|
|
|
name = "kinit";
|
2016-04-28 17:55:29 +02:00
|
|
|
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
|
2017-02-26 13:49:15 +01:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
|
2017-05-22 20:49:07 +02:00
|
|
|
buildInputs = [
|
2016-07-15 19:10:54 +02:00
|
|
|
kconfig kcrash ki18n kio kservice kwindowsystem
|
2016-04-28 17:55:29 +02:00
|
|
|
];
|
2016-04-21 17:32:21 +02:00
|
|
|
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
2017-04-23 17:27:31 +02:00
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
''-DNIXPKGS_KF5_KIOCORE="${getLib kio}/lib/libKF5KIOCore.so.5"''
|
|
|
|
''-DNIXPKGS_KF5_PARTS="${getLib kparts}/lib/libKF5Parts.so.5"''
|
|
|
|
''-DNIXPKGS_KF5_PLASMA="${getLib plasma-framework}/lib/libKF5Plasma.so.5"''
|
|
|
|
];
|
2017-05-22 20:49:07 +02:00
|
|
|
postFixup = ''
|
|
|
|
moveToOutput "lib/libexec/kf5/start_kdeinit" "$bin"
|
|
|
|
'';
|
|
|
|
setupHook = writeScript "setup-hook.sh" ''
|
|
|
|
kinitFixupOutputHook() {
|
|
|
|
if [ $prefix != ''${!outputBin} ] && [ -d $prefix/lib ]; then
|
|
|
|
mkdir -p ''${!outputBin}/lib
|
|
|
|
find $prefix/lib -maxdepth 1 -name 'libkdeinit5_*.so' -exec ln -s \{\} ''${!outputBin}/lib \;
|
|
|
|
rmdir --ignore-fail-on-non-empty ''${!outputBin}/lib
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
fixupOutputHooks+=(kinitFixupOutputHook)
|
|
|
|
'';
|
2016-04-21 17:32:21 +02:00
|
|
|
}
|