2023-04-29 16:46:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, gettext, coreutils, gnused, gnome
|
2024-07-27 06:49:29 +00:00
|
|
|
, adwaita-icon-theme
|
2021-02-05 17:12:51 +00:00
|
|
|
, gnugrep, parted, glib, libuuid, pkg-config, gtkmm3, libxml2
|
2024-05-15 15:35:15 +00:00
|
|
|
, gpart, hdparm, procps, util-linux, polkit, wrapGAppsHook3, substituteAll
|
2024-09-19 14:19:46 +00:00
|
|
|
, mtools, dosfstools, xhost
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "gparted";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-09-19 14:19:46 +00:00
|
|
|
url = "mirror://sourceforge/gparted/gparted-${version}.tar.gz";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-m59Rs85JTdy1mlXhrmZ5wJQ2YE4zHb9aU21g3tbG6ls=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tries to run `pkexec --version` to get version.
|
|
|
|
# however the binary won't be suid so it returns
|
|
|
|
# an error preventing the program from detection
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./polkit.patch;
|
|
|
|
polkit_version = polkit.version;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
configureFlags = [ "--disable-doc" "--enable-xhost-root" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
buildInputs = [ parted glib libuuid gtkmm3 libxml2 polkit.bin adwaita-icon-theme ];
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ gettext pkg-config wrapGAppsHook3 ];
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# For ITS rules
|
|
|
|
addToSearchPath "XDG_DATA_DIRS" "${polkit.out}/share"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2024-09-19 14:19:46 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ gpart hdparm util-linux procps coreutils gnused gnugrep mtools dosfstools xhost ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Doesn't get installed automaticallly if PREFIX != /usr
|
|
|
|
postInstall = ''
|
|
|
|
install -D -m0644 org.gnome.gparted.policy \
|
|
|
|
$out/share/polkit-1/actions/org.gnome.gparted.policy
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Graphical disk partitioning tool";
|
|
|
|
longDescription = ''
|
|
|
|
GNOME Partition Editor for creating, reorganizing, and deleting disk
|
|
|
|
partitions. GParted enables you to change the partition organization
|
|
|
|
while preserving the partition contents.
|
|
|
|
'';
|
|
|
|
homepage = "https://gparted.org";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "gparted";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|