nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

parted: 3.2 -> 3.3

+18 -52
+18 -18
pkgs/tools/misc/parted/default.nix
··· 1 - { stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline, perl, python2 2 - , utillinux, check, enableStatic ? false }: 1 + { stdenv 2 + , fetchurl 3 + , fetchpatch 4 + , lvm2 5 + , libuuid 6 + , gettext 7 + , readline 8 + , dosfstools 9 + , e2fsprogs 10 + , perl 11 + , python2 12 + , utillinux 13 + , check 14 + , enableStatic ? false 15 + }: 3 16 4 17 stdenv.mkDerivation rec { 5 - name = "parted-3.2"; 18 + name = "parted-3.3"; 6 19 7 20 src = fetchurl { 8 21 url = "mirror://gnu/parted/${name}.tar.xz"; 9 - sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"; 22 + sha256 = "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"; 10 23 }; 11 24 12 25 outputs = [ "out" "dev" "man" "info" ]; 13 - 14 - patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch 15 - ++ stdenv.lib.optional stdenv.hostPlatform.isMusl 16 - (fetchpatch { 17 - url = "https://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch?id=9c5cd3c329a40ba4559cc1d8c7d17a9bf95c237b"; 18 - sha256 = "117ypyiwvzym6pi8xmy16wa5z3sbpx7gh6haabs6kfb1x2894z7q"; 19 - }) 20 - ++ stdenv.lib.optional (lvm2 == null) 21 - (fetchpatch { 22 - url = https://git.savannah.gnu.org/cgit/parted.git/patch/?id=7e87ca3c531228d35e13e802d2622006138b104c; 23 - sha256 = "0i29lfg8cwj342q5s7qwqhncz2bkifj5rjc7cx6jd4zqb6ykkndj"; 24 - }); 25 26 26 27 postPatch = '' 27 28 patchShebangs tests ··· 43 42 # Tests were previously failing due to Hydra running builds as uid 0. 44 43 # That should hopefully be fixed now. 45 44 doCheck = !stdenv.hostPlatform.isMusl; /* translation test */ 46 - 47 - checkInputs = [ check perl python2 utillinux ]; 45 + checkInputs = [ check dosfstools e2fsprogs perl python2 utillinux ]; 48 46 49 47 meta = { 50 48 description = "Create, destroy, resize, check, and copy partitions";
-34
pkgs/tools/misc/parted/gpt-unicode-test-fix.patch
··· 1 - From Ludo's suggestion at: 2 - 3 - http://debbugs.gnu.org/cgi/bugreport.cgi?msg=8;bug=18258 4 - 5 - diff --git a/tests/t0251-gpt-unicode.sh b/tests/t0251-gpt-unicode.sh 6 - index c845950..fa63a72 100755 7 - --- a/tests/t0251-gpt-unicode.sh 8 - +++ b/tests/t0251-gpt-unicode.sh 9 - @@ -22,7 +22,24 @@ dev=loop-file 10 - # create zeroed device 11 - truncate -s 10m $dev || fail=1 12 - 13 - -export LC_ALL=C.UTF-8 14 - +found_locale=no 15 - +for locale in en_US de_DE fr_FR es_ES 16 - +do 17 - + LC_ALL="$locale.UTF-8" 18 - + export LC_ALL 19 - + 20 - + # In a UTF-8 locale, the string below prints as 4 characters. 21 - + if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then 22 - + found_locale=yes 23 - + break 24 - + fi 25 - +done 26 - + 27 - +if [ "$found_locale" != "yes" ]; then 28 - + echo "no valid UTF-8 locale found; skipping" >&2 29 - + exit 77 30 - +fi 31 - + 32 - # create gpt label with named partition 33 - part_name=$(printf 'foo\341\264\244') 34 - parted -s $dev mklabel gpt mkpart primary ext2 1MiB 2MiB name 1 $part_name > empty 2>&1 || fail=1