2021-02-22 14:32:37 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchpatch, extra-cmake-modules
|
|
|
|
, qca-qt5, kauth, kio, polkit-qt, qtbase
|
|
|
|
, util-linux
|
|
|
|
}:
|
2016-12-30 03:54:25 +00:00
|
|
|
|
2020-08-24 11:46:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-12-30 03:54:25 +00:00
|
|
|
pname = "kpmcore";
|
2021-02-22 14:32:37 +00:00
|
|
|
# NOTE: When changing this version, also change the version of `partition-manager`.
|
|
|
|
version = "4.2.0";
|
2016-12-30 03:54:25 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-08-24 22:36:49 +00:00
|
|
|
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
|
2021-02-22 14:32:37 +00:00
|
|
|
hash = "sha256-MvW0CqvFZtzcJlya6DIpzorPbKJai6fxt7nKsKpJn54=";
|
2016-12-30 03:54:25 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 14:32:37 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build with `kcoreaddons` >= 5.77.0
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/KDE/kpmcore/commit/07e5a3ac2858e6d38cc698e0f740e7a693e9f302.patch";
|
|
|
|
sha256 = "sha256-LYzea888euo2HXM+acWaylSw28iwzOdZBvPBt/gjP1s=";
|
|
|
|
})
|
|
|
|
# Fix crash when `fstab` omits mount options.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/KDE/kpmcore/commit/eea84fb60525803a789e55bb168afb968464c130.patch";
|
|
|
|
sha256 = "sha256-NJ3PvyRC6SKNSOlhJPrDDjepuw7IlAoufPgvml3fap0=";
|
|
|
|
})
|
|
|
|
];
|
2016-12-30 03:54:25 +00:00
|
|
|
|
2021-02-22 14:32:37 +00:00
|
|
|
buildInputs = [
|
|
|
|
qca-qt5
|
|
|
|
kauth
|
2020-10-23 06:09:44 +00:00
|
|
|
kio
|
2021-02-22 14:32:37 +00:00
|
|
|
polkit-qt
|
2018-05-09 08:57:38 +00:00
|
|
|
|
2021-02-22 14:32:37 +00:00
|
|
|
util-linux # Needs blkid in configure script (note that this is not provided by util-linux-compat)
|
2016-12-30 03:54:25 +00:00
|
|
|
];
|
2020-08-24 11:46:14 +00:00
|
|
|
|
2016-12-30 03:54:25 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules ];
|
2020-08-24 11:46:14 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2021-02-22 14:32:37 +00:00
|
|
|
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 ];
|
2020-08-24 11:46:14 +00:00
|
|
|
# The build requires at least Qt 5.14:
|
2021-02-22 14:32:37 +00:00
|
|
|
broken = versionOlder qtbase.version "5.14";
|
2016-12-30 03:54:25 +00:00
|
|
|
};
|
|
|
|
}
|