2021-01-15 12:19:50 +03:00
|
|
|
{ lib, stdenv
|
2019-11-28 01:06:22 +03:00
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, lvm2
|
|
|
|
, libuuid
|
|
|
|
, gettext
|
|
|
|
, readline
|
|
|
|
, dosfstools
|
|
|
|
, e2fsprogs
|
|
|
|
, perl
|
2020-11-23 22:59:11 +03:00
|
|
|
, python3
|
2020-11-24 18:29:28 +03:00
|
|
|
, util-linux
|
2019-11-28 01:06:22 +03:00
|
|
|
, check
|
2020-12-20 09:11:26 +03:00
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
2019-11-28 01:06:22 +03:00
|
|
|
}:
|
2009-07-27 01:03:52 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-02 12:41:34 +03:00
|
|
|
pname = "parted";
|
2022-08-01 07:27:39 +03:00
|
|
|
version = "3.5";
|
2005-08-01 00:11:56 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-02 12:41:34 +03:00
|
|
|
url = "mirror://gnu/parted/parted-${version}.tar.xz";
|
2022-08-01 07:27:39 +03:00
|
|
|
sha256 = "sha256-STjdXBwSX2x4sfSz4pdSbxjudKpD1FwkhXix0kcMBaI=";
|
2005-08-01 00:11:56 +04:00
|
|
|
};
|
2007-05-14 02:43:15 +04:00
|
|
|
|
2018-05-23 21:05:42 +03:00
|
|
|
outputs = [ "out" "dev" "man" "info" ];
|
|
|
|
|
2018-08-09 00:35:34 +03:00
|
|
|
postPatch = ''
|
2014-10-22 03:17:26 +04:00
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2010-12-13 02:21:35 +03:00
|
|
|
buildInputs = [ libuuid ]
|
2021-01-15 12:19:50 +03:00
|
|
|
++ lib.optional (readline != null) readline
|
|
|
|
++ lib.optional (gettext != null) gettext
|
|
|
|
++ lib.optional (lvm2 != null) lvm2;
|
2009-07-27 01:03:52 +04:00
|
|
|
|
2010-12-13 02:21:35 +03:00
|
|
|
configureFlags =
|
|
|
|
(if (readline != null)
|
|
|
|
then [ "--with-readline" ]
|
|
|
|
else [ "--without-readline" ])
|
2021-01-15 12:19:50 +03:00
|
|
|
++ lib.optional (lvm2 == null) "--disable-device-mapper"
|
|
|
|
++ lib.optional enableStatic "--enable-static";
|
2009-07-27 01:03:52 +04:00
|
|
|
|
2016-12-20 23:57:28 +03:00
|
|
|
# Tests were previously failing due to Hydra running builds as uid 0.
|
|
|
|
# That should hopefully be fixed now.
|
2018-03-27 01:31:32 +03:00
|
|
|
doCheck = !stdenv.hostPlatform.isMusl; /* translation test */
|
2023-01-21 15:00:00 +03:00
|
|
|
nativeCheckInputs = [ check dosfstools e2fsprogs perl python3 util-linux ];
|
2009-02-15 02:44:08 +03:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 18:21:08 +04:00
|
|
|
description = "Create, destroy, resize, check, and copy partitions";
|
2009-07-27 01:03:52 +04:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://www.gnu.org/software/parted/";
|
2021-01-15 12:19:50 +03:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2009-07-27 01:03:52 +04:00
|
|
|
|
|
|
|
maintainers = [
|
|
|
|
# Add your name here!
|
|
|
|
];
|
2009-09-17 14:42:27 +04:00
|
|
|
|
2010-03-01 16:12:48 +03:00
|
|
|
# GNU Parted requires libuuid, which is part of util-linux-ng.
|
2021-01-15 12:19:50 +03:00
|
|
|
platforms = lib.platforms.linux;
|
2009-02-15 02:44:08 +03:00
|
|
|
};
|
2005-08-01 00:11:56 +04:00
|
|
|
}
|