<commit_before># This function builds an RPM from a source tarball that contains a
# RPM spec file (i.e., one that can be built using `rpmbuild -ta').

{ name ? "rpm-build"
, diskImage
, src, vmTools
, ... } @ args:

vmTools.buildRPM (

  removeAttrs args ["vmTools"] //

  {
    name = name + "-" + diskImage.name + (if src ? version then "-" + src.version else "");

    preBuild = ''
      ensureDir $out/nix-support
      cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name

      # If `src' is the result of a call to `makeSourceTarball', then it
      # has a subdirectory containing the actual tarball(s).  If there are
      # multiple tarballs, just pick the first one.
      if test -d $src/tarballs; then
          src=$(ls $src/tarballs/*.tar.bz2 $src/tarballs/*.tar.gz | sort | head -1)
      fi
    ''; # */

    postInstall = ''
      for i in $out/rpms/*/*.rpm; do
        echo "file rpm $i" >> $out/nix-support/hydra-build-products
      done
    ''; # */

    meta = (if args ? meta then args.meta else {}) // {
      description = "Build of an RPM package on ${diskImage.fullName} (${diskImage.name})";
    };
  }

)
<commit_msg>add extrarpms to build-products of rpm build<commit_after># This function builds an RPM from a source tarball that contains a
# RPM spec file (i.e., one that can be built using `rpmbuild -ta').

{ name ? "rpm-build"
, diskImage
, src, vmTools
, ... } @ args:

vmTools.buildRPM (

  removeAttrs args ["vmTools"] //

  {
    name = name + "-" + diskImage.name + (if src ? version then "-" + src.version else "");

    preBuild = ''
      ensureDir $out/nix-support
      cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name

      # If `src' is the result of a call to `makeSourceTarball', then it
      # has a subdirectory containing the actual tarball(s).  If there are
      # multiple tarballs, just pick the first one.
      if test -d $src/tarballs; then
          src=$(ls $src/tarballs/*.tar.bz2 $src/tarballs/*.tar.gz | sort | head -1)
      fi
    ''; # */

    postInstall = ''
      for i in $out/rpms/*/*.rpm; do
        echo "file rpm $i" >> $out/nix-support/hydra-build-products
      done
      for rpmdir in $extraRPMs ; do
        echo "file rpm $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\.rpm' | sort | head -1)" >> $out/nix-support/hydra-build-products
      done
    ''; # */

    meta = (if args ? meta then args.meta else {}) // {
      description = "Build of an RPM package on ${diskImage.fullName} (${diskImage.name})";
    };
  }

)

{'fraction_non_alphanumeric': 0.1498422712933754, 'fraction_numerical': 0.001971608832807571, 'mean_word_length': 2.391711229946524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '4541651', 'n_tokens_mistral': 890, 'n_tokens_neox': 846, 'n_words': 262}