about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/kde/kpmcore/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/kde/kpmcore/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/kde/kpmcore/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/kde/kpmcore/default.nix b/nixpkgs/pkgs/applications/kde/kpmcore/default.nix
new file mode 100644
index 000000000000..4bfc4db0f4a5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/kde/kpmcore/default.nix
@@ -0,0 +1,44 @@
+{ mkDerivation
+, lib
+, extra-cmake-modules
+, qca-qt5
+, kauth
+, kio
+, polkit-qt
+, util-linux
+}:
+
+mkDerivation rec {
+  pname = "kpmcore";
+
+  patches = [
+    ./nixostrustedprefix.patch
+  ];
+
+  nativeBuildInputs = [ extra-cmake-modules ];
+
+  buildInputs = [
+    qca-qt5
+    kauth
+    kio
+    polkit-qt
+
+    util-linux # Needs blkid in configure script (note that this is not provided by util-linux-compat)
+  ];
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    substituteInPlace src/util/CMakeLists.txt \
+      --replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions
+    substituteInPlace src/backend/corebackend.cpp \
+      --replace /usr/share/polkit-1/actions/org.kde.kpmcore.externalcommand.policy $out/share/polkit-1/actions/org.kde.kpmcore.externalcommand.policy
+  '';
+
+  meta = with lib; {
+    description = "KDE Partition Manager core library";
+    homepage = "https://invent.kde.org/system/kpmcore";
+    license = with licenses; [ cc-by-40 cc0 gpl3Plus mit ];
+    maintainers = with maintainers; [ peterhoeg oxalica ];
+  };
+}