<commit_before>{ stdenv, fetchurl, makeWrapper, pkgconfig
, gtk, girara, ncurses, gettext, docutils
, file, sqlite, glib, texlive
, synctexSupport ? true
}:

assert synctexSupport -> texlive != null;

with stdenv.lib;

stdenv.mkDerivation rec {
  name    = "zathura-core-${version}";
  version = "0.3.7";

  src = fetchurl {
    url    = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
    sha256 = "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2";
  };

  icon = ./icon.xpm;

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    file gtk girara
    gettext makeWrapper sqlite glib
  ] ++ optional synctexSupport texlive.bin.core;

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

  makeFlags = [
    "PREFIX=$(out)"
    "RSTTOMAN=${docutils}/bin/rst2man.py"
    "VERBOSE=1"
    "TPUT=${ncurses.out}/bin/tput"
    (optionalString synctexSupport "WITH_SYNCTEX=1")
  ];

  postInstall = ''
    wrapProgram "$out/bin/zathura" \
      --prefix PATH ":" "${makeBinPath [ file ]}" \
      --prefix XDG_CONFIG_DIRS ":" "$out/etc"

    install -Dm644 $icon $out/share/pixmaps/pwmt.xpm
    mkdir -pv $out/etc
    echo "set window-icon $out/share/pixmaps/pwmt.xpm" > $out/etc/zathurarc
    echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
  '';

  meta = {
    homepage    = http://pwmt.org/projects/zathura/;
    description = "A core component for zathura PDF viewer";
    license     = licenses.zlib;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ garbas ];
  };
}<commit_msg>zathura: No need for manual rst2man path anymore<commit_after>{ stdenv, fetchurl, makeWrapper, pkgconfig
, gtk, girara, ncurses, gettext, docutils
, file, sqlite, glib, texlive
, synctexSupport ? true
}:

assert synctexSupport -> texlive != null;

with stdenv.lib;

stdenv.mkDerivation rec {
  name    = "zathura-core-${version}";
  version = "0.3.7";

  src = fetchurl {
    url    = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
    sha256 = "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2";
  };

  icon = ./icon.xpm;

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [
    file gtk girara
    gettext makeWrapper sqlite glib
  ] ++ optional synctexSupport texlive.bin.core;

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

  makeFlags = [
    "PREFIX=$(out)"
    "VERBOSE=1"
    "TPUT=${ncurses.out}/bin/tput"
    (optionalString synctexSupport "WITH_SYNCTEX=1")
  ];

  postInstall = ''
    wrapProgram "$out/bin/zathura" \
      --prefix PATH ":" "${makeBinPath [ file ]}" \
      --prefix XDG_CONFIG_DIRS ":" "$out/etc"

    install -Dm644 $icon $out/share/pixmaps/pwmt.xpm
    mkdir -pv $out/etc
    echo "set window-icon $out/share/pixmaps/pwmt.xpm" > $out/etc/zathurarc
    echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
  '';

  meta = {
    homepage    = http://pwmt.org/projects/zathura/;
    description = "A core component for zathura PDF viewer";
    license     = licenses.zlib;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ garbas ];
  };
}
{'fraction_non_alphanumeric': 0.1470493389229281, 'fraction_numerical': 0.0199935504675911, 'mean_word_length': 3.249315068493151, 'pattern_counts': {'":': 4, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7051476', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1190, 'n_words': 212}