<commit_before>{ lib, stdenv, fetchurl, cmake }:

stdenv.mkDerivation rec {
  pname = "libunarr";
  version = "1.0.1";

  src = fetchurl {
    url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
    sha256 = "1db500k6w90qn6qb4j3zcczailmmv81q9lv4bwq516hbncg5p4sl";
  };

  nativeBuildInputs = [ cmake ];

  # https://github.com/selmf/unarr/issues/23
  postPatch = ''
    substituteInPlace pkg-config.pc.cmake \
      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
  '';

  meta = with lib; {
    homepage = "https://github.com/selmf/unarr";
    description = "A lightweight decompression library with support for rar, tar and zip archives";
    license = licenses.lgpl3;
  };
}<commit_msg>libunarr: fix build on darwin<commit_after>{ lib, stdenv, fetchurl, fetchpatch, cmake }:

stdenv.mkDerivation rec {
  pname = "libunarr";
  version = "1.0.1";

  src = fetchurl {
    url = "https://github.com/selmf/unarr/releases/download/v${version}/unarr-${version}.tar.xz";
    sha256 = "1db500k6w90qn6qb4j3zcczailmmv81q9lv4bwq516hbncg5p4sl";
  };

  nativeBuildInputs = [ cmake ];

  # https://github.com/selmf/unarr/issues/23
  postPatch = ''
    substituteInPlace pkg-config.pc.cmake \
      --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
  ''
  # ld: unknown option: --no-undefined
  + lib.optionalString stdenv.isDarwin ''
    substituteInPlace CMakeLists.txt \
      --replace '-Wl,--no-undefined -Wl,--as-needed' '-Wl,-undefined,error'
  '';

  meta = with lib; {
    homepage = "https://github.com/selmf/unarr";
    description = "A lightweight decompression library with support for rar, tar and zip archives";
    license = licenses.lgpl3Plus;
  };
}
{'fraction_non_alphanumeric': 0.1482059282371295, 'fraction_numerical': 0.029121164846593862, 'mean_word_length': 3.762376237623762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '1554191', 'n_tokens_mistral': 777, 'n_tokens_neox': 718, 'n_words': 115}