<commit_before>{ stdenv, fetchurl, fetchpatch, devicemapper, libuuid, gettext, readline, perl, python2
, utillinux, check, enableStatic ? false, hurd ? null }:

stdenv.mkDerivation rec {
  name = "parted-3.2";

  src = fetchurl {
    url = "mirror://gnu/parted/${name}.tar.xz";
    sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5";
  };

  patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch
    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl
    (fetchpatch {
      url = "https://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch?id=9c5cd3c329a40ba4559cc1d8c7d17a9bf95c237b";
      sha256 = "117ypyiwvzym6pi8xmy16wa5z3sbpx7gh6haabs6kfb1x2894z7q";
    });

  postPatch = stdenv.lib.optionalString doCheck ''
    patchShebangs tests
  '';

  buildInputs = [ libuuid ]
    ++ stdenv.lib.optional (readline != null) readline
    ++ stdenv.lib.optional (gettext != null) gettext
    ++ stdenv.lib.optional (devicemapper != null) devicemapper
    ++ stdenv.lib.optional (hurd != null) hurd
    ++ stdenv.lib.optionals doCheck [ check perl python2 ];

  configureFlags =<commit_msg>parted: Split into multiple outputs<commit_after>{ stdenv, fetchurl, fetchpatch, devicemapper, libuuid, gettext, readline, perl, python2
, utillinux, check, enableStatic ? false, hurd ? null }:

stdenv.mkDerivation rec {
  name = "parted-3.2";

  src = fetchurl {
    url = "mirror://gnu/parted/${name}.tar.xz";
    sha256 = "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5";
  };

  outputs = [ "out" "dev" "man" "info" ];

  patches = stdenv.lib.optional doCheck ./gpt-unicode-test-fix.patch
    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl
    (fetchpatch {
      url = "https://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch?id=9c5cd3c329a40ba4559cc1d8c7d17a9bf95c237b";
      sha256 = "117ypyiwvzym6pi8xmy16wa5z3sbpx7gh6haabs6kfb1x2894z7q";
    });

  postPatch = stdenv.lib.optionalString doCheck ''
    patchShebangs tests
  '';

  buildInputs = [ libuuid ]
    ++ stdenv.lib.optional (readline != null) readline
    ++ stdenv.lib.optional (gettext != null) gettext
    ++ stdenv.lib.optional (devicemapper != null) devicemapper
    ++ stdenv.lib.optional (hurd != null) hurd
    ++ stdenv.lib.optionals doCheck [ check perl python2 ];

  configureFlags =
{'fraction_non_alphanumeric': 0.1295738269479122, 'fraction_numerical': 0.057684029272492464, 'mean_word_length': 4.03030303030303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1538234', 'n_tokens_mistral': 985, 'n_tokens_neox': 920, 'n_words': 141}