<commit_before>{ stdenv, intltool, fetchurl, pkgconfig, libxml2
, bash, gtk3, glib, wrapGAppsHook
, itstool, gnome3, librsvg, gdk_pixbuf, mpfr, gmp, libsoup }:

stdenv.mkDerivation rec {
  inherit (import ./src.nix fetchurl) name src;

  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";

  propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];

  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];

  buildInputs = [ bash gtk3 glib intltool itstool
                  libxml2 gnome3.gtksourceview mpfr gmp
                  gdk_pixbuf gnome3.defaultIconTheme librsvg
                  gnome3.gsettings_desktop_schemas gnome3.dconf libsoup ];

  meta = with stdenv.lib; {
    homepage = https://wiki.gnome.org/action/show/Apps/Calculator;
    description = "Application that solves mathematical equations and is suitable as a default application in a Desktop environment";
    maintainers = gnome3.maintainers;
    license = licenses.gpl2;
    platforms = platforms.linux;<commit_msg>gnome-calculator: work around #17912, in a hacky way<commit_after>{ stdenv, intltool, fetchurl, pkgconfig, libxml2
, bash, gtk3, glib, wrapGAppsHook
, autoreconfHook
, itstool, gnome3, librsvg, gdk_pixbuf, mpfr, gmp, libsoup }:

let
  # work-around for https://github.com/NixOS/nixpkgs/issues/17912
  glib-hacked = (glib.overrideDerivation (attrs: {
    postPatch = attrs.postPatch or "" + ''
      cat '${rPatch}' | sed '/^---.*gitignore/,/^---/d' | patch -R -p1
    '';
    nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ];
  })).dev; # we need just bin/glib-compile-resources; everything else should be the same
  rPatch = fetchurl {
    name = "glib-resources.patch";
    url = "https://bug673101.bugzilla-attachments.gnome.org/attachment.cgi?"
      + "id=329105&action=diff&collapsed=&context=patch&format=raw&headers=1";
    sha256 = "051d7l1wx9sp5wcnv7yk6mbn3akac1m06sp3jl3hqapx74bkmai0";
  };
in
stdenv.mkDerivation rec {
  inherit (import ./src.nix fetchurl) name src;

  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";

  propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];

  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];

  buildInputs = [ glib-hacked bash gtk3 glib intltool itstool
                  libxml2 gnome3.gtksourceview mpfr gmp
                  gdk_pixbuf gnome3.defaultIconTheme librsvg
                  gnome3.gsettings_desktop_schemas gnome3.dconf libsoup ];

  meta = with stdenv.lib; {
    homepage = https://wiki.gnome.org/action/show/Apps/Calculator;
    description = "Application that solves mathematical equations and is suitable as a default application in a Desktop environment";
    maintainers = gnome3.maintainers;
    license = licenses.gpl2;
    platforms = platforms.linux;
{'fraction_non_alphanumeric': 0.10712993123416577, 'fraction_numerical': 0.02714440825190011, 'mean_word_length': 3.645378151260504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4507559', 'n_tokens_mistral': 1031, 'n_tokens_neox': 931, 'n_words': 201}