2021-02-22 14:32:37 +00:00
|
|
|
{ mkDerivation, fetchurl, lib, makeWrapper
|
2019-07-05 15:42:08 +00:00
|
|
|
, extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook
|
2017-07-09 02:44:10 +00:00
|
|
|
, kconfig, kcrash, kinit, kpmcore
|
2021-02-22 14:32:37 +00:00
|
|
|
, 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
|
2018-05-22 10:10:51 +00:00
|
|
|
}:
|
2016-12-30 03:54:25 +00:00
|
|
|
|
|
|
|
let
|
2021-02-22 14:32:37 +00:00
|
|
|
# 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
|
|
|
|
];
|
|
|
|
|
2017-05-16 15:56:41 +00:00
|
|
|
in mkDerivation rec {
|
2021-02-22 14:32:37 +00:00
|
|
|
pname = "partitionmanager";
|
|
|
|
# NOTE: When changing this version, also change the version of `kpmcore`.
|
|
|
|
version = "4.2.0";
|
2016-12-30 03:54:25 +00:00
|
|
|
|
2017-05-16 15:56:41 +00:00
|
|
|
src = fetchurl {
|
2021-02-22 14:32:37 +00:00
|
|
|
url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-6Qlt1c47Eek6TkWWBzTyBZYJ1jfhtwsC9X5q5h6IhPg=";
|
2016-12-30 03:54:25 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 14:32:37 +00:00
|
|
|
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook makeWrapper ];
|
2018-05-22 10:10:51 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ];
|
|
|
|
|
2021-02-22 14:32:37 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/partitionmanager \
|
|
|
|
--prefix PATH : "${runtimeDeps}"
|
|
|
|
'';
|
|
|
|
|
2017-05-16 15:56:41 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "KDE Partition Manager";
|
2021-02-22 14:32:37 +00:00
|
|
|
license = with licenses; [ cc-by-40 cc0 gpl3Plus lgpl3Plus mit ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.kde.org/applications/system/kdepartitionmanager/";
|
2021-02-22 14:32:37 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg oxalica ];
|
2017-05-16 15:56:41 +00:00
|
|
|
};
|
2016-12-30 03:54:25 +00:00
|
|
|
}
|