<commit_before>{ stdenv, fetchFromGitHub, buildDotnetPackage, dotnetPackages, gtksharp,
  gettext }:

let
  mono-addins = dotnetPackages.MonoAddins;
in
buildDotnetPackage rec {
  name = "pinta-1.6";

  baseName = "Pinta";
  version = "1.6";
  outputFiles = [ "bin/*" ];
  buildInputs = [ gtksharp mono-addins gettext ];
  xBuildFiles = [ "Pinta.sln" ];

  src = fetchFromGitHub {
    owner = "PintaProject";
    repo = "Pinta";
    rev = version;
    sha256 = "0vgswy981c7ys4q7js5k85sky7bz8v32wsfq3br4j41vg92pw97d";
  };

  # Remove version information from nodes <Reference Include="... Version=... ">
  postPatch = with stdenv.lib; let
    csprojFiles = [
      "Pinta/Pinta.csproj"
      "Pinta.Core/Pinta.Core.csproj"
      "Pinta.Effects/Pinta.Effects.csproj"
      "Pinta.Gui.Widgets/Pinta.Gui.Widgets.csproj"
      "Pinta.Resources/Pinta.Resources.csproj"
      "Pinta.Tools/Pinta.Tools.csproj"
    ];
    versionedNames = [
      "Mono\\.Addins"
      "Mono\\.Posix"
      "Mono\\.Addins\\.Gui"
      "Mono\\.Addins\\.Setup"
    ];

    stripVersion = name: file: let
        match = ''<Reference Include="${name}([ ,][^"]*)?"'';
        replace = ''<Reference Include="${name}"'';
      in "sed -i -re 's/${match}/${replace}/g' ${file}\n";

    # Map all possible pairs of two lists
    map2 = f: listA: listB: concatMap (a: map (f a) listB) listA;
    concatMap2Strings = f: listA: listB: concatStrings (map2 f listA listB);
  in
    concatMap2Strings stripVersion versionedNames csprojFiles
    + ''
      # For some reason there is no Microsoft.Common.tasks file
      # in ''${mono}/lib/mono/3.5 .
      substituteInPlace Pinta.Install.proj \
        --replace 'ToolsVersion="3.5"' 'ToolsVersion="4.0"' \
        --replace "/usr/local" "$out"
    '';

  makeWrapperArgs = [
    ''--prefix MONO_GAC_PREFIX ':' "${gtksharp}"''
    ''--prefix LD_LIBRARY_PATH ':' "${gtksharp}/lib"''
    ''--prefix LD_LIBRARY_PATH ':' "${gtksharp.gtk}/lib"''
  ];<commit_msg>pinta: unbreak after multiple-outputs change<commit_after>{ stdenv, fetchFromGitHub, buildDotnetPackage, dotnetPackages, gtksharp,
  gettext }:

let
  mono-addins = dotnetPackages.MonoAddins;
in
buildDotnetPackage rec {
  name = "pinta-1.6";

  baseName = "Pinta";
  version = "1.6";
  outputFiles = [ "bin/*" ];
  buildInputs = [ gtksharp mono-addins gettext ];
  xBuildFiles = [ "Pinta.sln" ];

  src = fetchFromGitHub {
    owner = "PintaProject";
    repo = "Pinta";
    rev = version;
    sha256 = "0vgswy981c7ys4q7js5k85sky7bz8v32wsfq3br4j41vg92pw97d";
  };

  # Remove version information from nodes <Reference Include="... Version=... ">
  postPatch = with stdenv.lib; let
    csprojFiles = [
      "Pinta/Pinta.csproj"
      "Pinta.Core/Pinta.Core.csproj"
      "Pinta.Effects/Pinta.Effects.csproj"
      "Pinta.Gui.Widgets/Pinta.Gui.Widgets.csproj"
      "Pinta.Resources/Pinta.Resources.csproj"
      "Pinta.Tools/Pinta.Tools.csproj"
    ];
    versionedNames = [
      "Mono\\.Addins"
      "Mono\\.Posix"
      "Mono\\.Addins\\.Gui"
      "Mono\\.Addins\\.Setup"
    ];

    stripVersion = name: file: let
        match = ''<Reference Include="${name}([ ,][^"]*)?"'';
        replace = ''<Reference Include="${name}"'';
      in "sed -i -re 's/${match}/${replace}/g' ${file}\n";

    # Map all possible pairs of two lists
    map2 = f: listA: listB: concatMap (a: map (f a) listB) listA;
    concatMap2Strings = f: listA: listB: concatStrings (map2 f listA listB);
  in
    concatMap2Strings stripVersion versionedNames csprojFiles
    + ''
      # For some reason there is no Microsoft.Common.tasks file
      # in ''${mono}/lib/mono/3.5 .
      substituteInPlace Pinta.Install.proj \
        --replace 'ToolsVersion="3.5"' 'ToolsVersion="4.0"' \
        --replace "/usr/local" "$out"
    '';

  makeWrapperArgs = [
    ''--prefix MONO_GAC_PREFIX ':' "${gtksharp}"''
    ''--prefix LD_LIBRARY_PATH ':' "${gtksharp}/lib"''
    ''--prefix LD_LIBRARY_PATH ':' "${gtksharp.gtk.out}/lib"''
  ];
{'fraction_non_alphanumeric': 0.16645681188617475, 'fraction_numerical': 0.019642407454041805, 'mean_word_length': 2.9133004926108375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '7310805', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1469, 'n_words': 278}