<commit_before>{ stdenv, callPackage, wineUnstable }:

with callPackage ./util.nix {};

let patch = (callPackage ./sources.nix {}).staging;
    build-inputs = pkgNames: extra:
      (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
in assert stdenv.lib.getVersion wineUnstable == patch.version;

(stdenv.lib.overrideDerivation wineUnstable (self: {
  buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;

  name = "${self.name}-staging";

  postPatch = self.postPatch or "" + ''
    patchShebangs tools
    cp -r ${patch}/patches .
    chmod +w patches
    cd patches
    patchShebangs gitapply.sh
    ./patchinstall.sh DESTDIR="$PWD/.." --all
    cd ..
  '';
})) // {
  meta = wineUnstable.meta // {
    description = wineUnstable.meta.description + " (with staging patches)";<commit_msg>wineStaging: use gitMinimal to apply patchset<commit_after>{ stdenv, callPackage, wineUnstable }:

with callPackage ./util.nix {};

let patch = (callPackage ./sources.nix {}).staging;
    build-inputs = pkgNames: extra:
      (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
in assert stdenv.lib.getVersion wineUnstable == patch.version;

(stdenv.lib.overrideDerivation wineUnstable (self: {
  buildInputs = build-inputs [ "perl" "utillinux" "autoconf" "gitMinimal" ] self.buildInputs;

  name = "${self.name}-staging";

  postPatch = self.postPatch or "" + ''
    patchShebangs tools
    cp -r ${patch}/patches .
    chmod +w patches
    cd patches
    patchShebangs gitapply.sh
    ./patchinstall.sh DESTDIR="$PWD/.." --all
    cd ..
  '';
})) // {
  meta = wineUnstable.meta // {
    description = wineUnstable.meta.description + " (with staging patches)";
{'fraction_non_alphanumeric': 0.14251921939680662, 'fraction_numerical': 0.0, 'mean_word_length': 3.512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4423519', 'n_tokens_mistral': 570, 'n_tokens_neox': 554, 'n_words': 127}