<commit_before>args: with args;

let name = "redland-${version}";
in 

stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "mirror://sf/librdf/${name}.tar.gz";
    sha256 = "aa90ded84f5dd4cc2330bf79d139e00ceb93c6a9b94d17e1a93449ad579e1524";
  };
  
  buildInputs = [pkgconfig];
  
  propagatedBuildInputs = [
    bdb openssl libxslt perl mysql postgresql sqlite curl pcre libxml2
    librdf_raptor librdf_rasqal
  ];
    
  configureFlags = "--with-threads --with-bdb=${bdb}";
  
  patchPhase = "sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl";
}<commit_msg>pkgs/development/libraries/redland/1.0.9.nix: fix build with sqlite 3.6.19<commit_after>args: with args;

let name = "redland-${version}";
in

stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "mirror://sf/librdf/${name}.tar.gz";
    sha256 = "aa90ded84f5dd4cc2330bf79d139e00ceb93c6a9b94d17e1a93449ad579e1524";
  };

  buildInputs = [pkgconfig];

  propagatedBuildInputs = [
    bdb openssl libxslt perl mysql postgresql sqlite curl pcre libxml2
    librdf_raptor librdf_rasqal
  ];

  configureFlags = "--with-threads --with-bdb=${bdb}";

  patchPhase =
  ''
    sed -e 1s@/usr@${perl}@ -i utils/touch-mtime.pl

    # Redland 1.0.9 uses an internal pre-processor symbol SQLITE_API
    # that collides with a symbol of the same name in sqlite 3.6.19.
    # This is a quick fix for the problem. A real solution needs to be
    # implemented upstream, though.
    find . -type f -exec sed -i -e 's/SQLITE_API/REDLAND_SQLITE_API/g' {} \;
  '';
}
{'fraction_non_alphanumeric': 0.1257328990228013, 'fraction_numerical': 0.06514657980456026, 'mean_word_length': 3.388571428571429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3823217', 'n_tokens_mistral': 665, 'n_tokens_neox': 607, 'n_words': 130}