at 15.09-beta 62 lines 2.1 kB view raw
1{ stdenv, fetchurl, devicemapper, libuuid, gettext, readline, perl, python 2, utillinux, check, enableStatic ? false, hurd ? null }: 3 4stdenv.mkDerivation rec { 5 name = "parted-3.2"; 6 7 src = fetchurl { 8 url = "mirror://gnu/parted/${name}.tar.xz"; 9 sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"; 10 }; 11 12 patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch; 13 14 postPatch = stdenv.lib.optionalString doCheck '' 15 patchShebangs tests 16 ''; 17 18 buildInputs = [ libuuid ] 19 ++ stdenv.lib.optional (readline != null) readline 20 ++ stdenv.lib.optional (gettext != null) gettext 21 ++ stdenv.lib.optional (devicemapper != null) devicemapper 22 ++ stdenv.lib.optional (hurd != null) hurd 23 ++ stdenv.lib.optionals doCheck [ check perl python ]; 24 25 configureFlags = 26 (if (readline != null) 27 then [ "--with-readline" ] 28 else [ "--without-readline" ]) 29 ++ stdenv.lib.optional (devicemapper == null) "--disable-device-mapper" 30 ++ stdenv.lib.optional enableStatic "--enable-static"; 31 32 doCheck = true; 33 34 preCheck = 35 stdenv.lib.optionalString doCheck 36 # The `t0400-loop-clobber-infloop.sh' test wants `mkswap'. 37 "export PATH=\"${utillinux}/sbin:$PATH\""; 38 39 meta = { 40 description = "Create, destroy, resize, check, and copy partitions"; 41 42 longDescription = '' 43 GNU Parted is an industrial-strength package for creating, destroying, 44 resizing, checking and copying partitions, and the file systems on 45 them. This is useful for creating space for new operating systems, 46 reorganising disk usage, copying data on hard disks and disk imaging. 47 48 It contains a library, libparted, and a command-line frontend, parted, 49 which also serves as a sample implementation and script backend. 50 ''; 51 52 homepage = http://www.gnu.org/software/parted/; 53 license = stdenv.lib.licenses.gpl3Plus; 54 55 maintainers = [ 56 # Add your name here! 57 ]; 58 59 # GNU Parted requires libuuid, which is part of util-linux-ng. 60 platforms = stdenv.lib.platforms.linux; 61 }; 62}