2018-07-17 21:11:16 +01:00
|
|
|
{ stdenv, fetchurl, lvm2, libuuid, gettext, readline
|
2018-08-28 22:17:54 +01:00
|
|
|
, utillinux, check, enableStatic ? false }:
|
2014-10-22 06:14:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "parted-3.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/parted/${name}.tar.xz";
|
|
|
|
sha256 = "05fa4m1bky9d13hqv91jlnngzlyn7y4rnnyq6d86w0dg3vww372y";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libuuid ]
|
|
|
|
++ stdenv.lib.optional (readline != null) readline
|
|
|
|
++ stdenv.lib.optional (gettext != null) gettext
|
2018-08-28 22:17:54 +01:00
|
|
|
++ stdenv.lib.optional (lvm2 != null) lvm2;
|
2014-10-22 06:14:48 +01:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
(if (readline != null)
|
|
|
|
then [ "--with-readline" ]
|
|
|
|
else [ "--without-readline" ])
|
2018-07-17 21:11:16 +01:00
|
|
|
++ stdenv.lib.optional (lvm2 == null) "--disable-device-mapper"
|
2014-10-22 06:14:48 +01:00
|
|
|
++ stdenv.lib.optional enableStatic "--enable-static";
|
|
|
|
|
|
|
|
doCheck = true;
|
2018-08-08 22:34:25 +01:00
|
|
|
checkInputs = [ check utillinux ];
|
2014-10-22 06:14:48 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Create, destroy, resize, check, and copy partitions";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
GNU Parted is an industrial-strength package for creating, destroying,
|
|
|
|
resizing, checking and copying partitions, and the file systems on
|
|
|
|
them. This is useful for creating space for new operating systems,
|
|
|
|
reorganising disk usage, copying data on hard disks and disk imaging.
|
|
|
|
|
|
|
|
It contains a library, libparted, and a command-line frontend, parted,
|
|
|
|
which also serves as a sample implementation and script backend.
|
|
|
|
'';
|
|
|
|
|
2018-12-01 18:22:13 +00:00
|
|
|
homepage = https://www.gnu.org/software/parted/;
|
2014-10-22 06:14:48 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
|
|
|
|
|
|
|
maintainers = [
|
|
|
|
# Add your name here!
|
|
|
|
];
|
|
|
|
|
|
|
|
# GNU Parted requires libuuid, which is part of util-linux-ng.
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|