1{
2 mkDerivation,
3 lib,
4 extra-cmake-modules,
5 qca-qt5,
6 kauth,
7 kio,
8 polkit-qt,
9 util-linux,
10}:
11
12mkDerivation {
13 pname = "kpmcore";
14
15 patches = [
16 ./nixostrustedprefix.patch
17 ];
18
19 nativeBuildInputs = [ extra-cmake-modules ];
20
21 buildInputs = [
22 qca-qt5
23 kauth
24 kio
25 polkit-qt
26
27 util-linux # Needs blkid in configure script (note that this is not provided by util-linux-compat)
28 ];
29
30 dontWrapQtApps = true;
31
32 preConfigure = ''
33 substituteInPlace src/util/CMakeLists.txt \
34 --replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions
35 substituteInPlace src/backend/corebackend.cpp \
36 --replace /usr/share/polkit-1/actions/org.kde.kpmcore.externalcommand.policy $out/share/polkit-1/actions/org.kde.kpmcore.externalcommand.policy
37 '';
38
39 meta = with lib; {
40 description = "KDE Partition Manager core library";
41 homepage = "https://invent.kde.org/system/kpmcore";
42 license = with licenses; [
43 cc-by-40
44 cc0
45 gpl3Plus
46 mit
47 ];
48 maintainers = with maintainers; [
49 peterhoeg
50 oxalica
51 ];
52 };
53}