{partition-manager,libsForQt5.kpmcore}: 3.3.1 -> 4.2.0 and fix build

This commit is contained in:
oxalica
2021-03-05 00:29:46 +08:00
parent 92b1ef601c
commit 2e024cb867
2 changed files with 77 additions and 25 deletions
+48 -12
View File
@@ -1,30 +1,66 @@
{ mkDerivation, fetchurl, lib
{ mkDerivation, fetchurl, lib, makeWrapper
, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
, kconfig, kcrash, kinit, kpmcore
, eject, libatasmart , util-linux, qtbase
, cryptsetup, lvm2, mdadm, smartmontools, systemdMinimal, util-linux
, btrfs-progs, dosfstools, e2fsprogs, exfat, f2fs-tools, fatresize, hfsprogs
, jfsutils, nilfs-utils, ntfs3g, reiser4progs, reiserfsprogs, udftools, xfsprogs, zfs
}:
let
pname = "partitionmanager";
# External programs are resolved by `partition-manager` and then
# invoked by `kpmcore_externalcommand` from `kpmcore` as root.
# So these packages should be in PATH of `partition-manager`.
# https://github.com/KDE/kpmcore/blob/06f15334ecfbe871730a90dbe2b694ba060ee998/src/util/externalcommand_whitelist.h
runtimeDeps = lib.makeBinPath [
cryptsetup
lvm2
mdadm
smartmontools
systemdMinimal
util-linux
btrfs-progs
dosfstools
e2fsprogs
exfat
f2fs-tools
fatresize
hfsprogs
jfsutils
nilfs-utils
ntfs3g
reiser4progs
reiserfsprogs
udftools
xfsprogs
zfs
# FIXME: Missing command: tune.exfat hfsck hformat fsck.nilfs2 {fsck,mkfs,debugfs,tunefs}.ocfs2
];
in mkDerivation rec {
name = "${pname}-${version}";
version = "3.3.1";
pname = "partitionmanager";
# NOTE: When changing this version, also change the version of `kpmcore`.
version = "4.2.0";
src = fetchurl {
url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "0jhggb4xksb0k0mj752n6pz0xmccnbzlp984xydqbz3hkigra1si";
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
hash = "sha256-6Qlt1c47Eek6TkWWBzTyBZYJ1jfhtwsC9X5q5h6IhPg=";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook ];
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook makeWrapper ];
# refer to kpmcore for the use of eject
buildInputs = [ eject libatasmart util-linux ];
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
postFixup = ''
wrapProgram $out/bin/partitionmanager \
--prefix PATH : "${runtimeDeps}"
'';
meta = with lib; {
description = "KDE Partition Manager";
license = licenses.gpl2;
license = with licenses; [ cc-by-40 cc0 gpl3Plus lgpl3Plus mit ];
homepage = "https://www.kde.org/applications/system/kdepartitionmanager/";
maintainers = with maintainers; [ peterhoeg ];
maintainers = with maintainers; [ peterhoeg oxalica ];
};
}