1 { lib, stdenv, fetchurl, gettext, coreutils, gnused, gnome
3 , gnugrep, parted, glib, libuuid, pkg-config, gtkmm3, libxml2
4 , gpart, hdparm, procps, util-linux, polkit, wrapGAppsHook3, substituteAll
5 , mtools, dosfstools, xhost
8 stdenv.mkDerivation rec {
13 url = "mirror://sourceforge/gparted/gparted-${version}.tar.gz";
14 sha256 = "sha256-m59Rs85JTdy1mlXhrmZ5wJQ2YE4zHb9aU21g3tbG6ls=";
17 # Tries to run `pkexec --version` to get version.
18 # however the binary won't be suid so it returns
19 # an error preventing the program from detection
23 polkit_version = polkit.version;
27 enableParallelBuilding = true;
29 configureFlags = [ "--disable-doc" "--enable-xhost-root" ];
31 buildInputs = [ parted glib libuuid gtkmm3 libxml2 polkit.bin adwaita-icon-theme ];
32 nativeBuildInputs = [ gettext pkg-config wrapGAppsHook3 ];
36 addToSearchPath "XDG_DATA_DIRS" "${polkit.out}/share"
41 --prefix PATH : "${lib.makeBinPath [ gpart hdparm util-linux procps coreutils gnused gnugrep mtools dosfstools xhost ]}"
45 # Doesn't get installed automaticallly if PREFIX != /usr
47 install -D -m0644 org.gnome.gparted.policy \
48 $out/share/polkit-1/actions/org.gnome.gparted.policy
52 description = "Graphical disk partitioning tool";
54 GNOME Partition Editor for creating, reorganizing, and deleting disk
55 partitions. GParted enables you to change the partition organization
56 while preserving the partition contents.
58 homepage = "https://gparted.org";
59 license = licenses.gpl2Plus;
60 platforms = platforms.linux;
61 mainProgram = "gparted";