<commit_before>{ stdenv, fetchurl, pkgconfig, glib, gettext }:

stdenv.mkDerivation rec {
  name= "sdcv-0.4.2";

  meta = {
    homepage = http://sdcv.sourceforge.net/;
    description = "Console version of StarDict program";
    maintainers = with stdenv.lib.maintainers; [ lovek323 ];
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.unix;
  };

  src = fetchurl {
    url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
    sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
  };

  patches = ( if stdenv.isDarwin
              then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
              else [ ./sdcv.cpp.patch ] );

  buildInputs = [ pkgconfig glib gettext ];

  preBuild = ''
    sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
  '';

  NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
    + stdenv.lib.optionalString stdenv.isDarwin " -lintl";<commit_msg>sdcv: turn off format hardening<commit_after>{ stdenv, fetchurl, pkgconfig, glib, gettext }:

stdenv.mkDerivation rec {
  name= "sdcv-0.4.2";

  meta = {
    homepage = http://sdcv.sourceforge.net/;
    description = "Console version of StarDict program";
    maintainers = with stdenv.lib.maintainers; [ lovek323 ];
    license = stdenv.lib.licenses.gpl2;
    platforms = stdenv.lib.platforms.unix;
  };

  src = fetchurl {
    url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
    sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
  };

  hardening_format = false;

  patches = ( if stdenv.isDarwin
              then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
              else [ ./sdcv.cpp.patch ] );

  buildInputs = [ pkgconfig glib gettext ];

  preBuild = ''
    sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
  '';

  NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
    + stdenv.lib.optionalString stdenv.isDarwin " -lintl";
{'fraction_non_alphanumeric': 0.13692061800745872, 'fraction_numerical': 0.038359083644112946, 'mean_word_length': 3.0042643923240937, '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': '4902552', 'n_tokens_mistral': 784, 'n_tokens_neox': 732, 'n_words': 119}