nixpkgs/pkgs/development/libraries/kde-frameworks/kinit/default.nix

35 lines
1.2 KiB
Nix
Raw Normal View History

{
mkDerivation, lib, copyPathsToStore, writeScript,
extra-cmake-modules, kdoctools,
kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework
2016-04-21 08:32:21 -07:00
}:
let inherit (lib) getLib; in
mkDerivation {
2016-04-21 08:32:21 -07:00
name = "kinit";
2016-04-28 08:55:29 -07:00
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
outputs = [ "out" "dev" ];
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
kconfig kcrash ki18n kio kservice kwindowsystem
2016-04-28 08:55:29 -07:00
];
2016-04-21 08:32:21 -07:00
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
2018-01-16 03:21:18 -08:00
CXXFLAGS = [
''-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\"''
];
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 08:32:21 -07:00
}