<commit_before>{ stdenv, fetchurl, perl, zlib }:

stdenv.mkDerivation rec {
  name = "libzip-${version}";
  version = "1.3.0";

  src = fetchurl {
    url = "https://www.nih.at/libzip/${name}.tar.gz";
    sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
  };

  outputs = [ "out" "dev" ];

  nativeBuildInputs = [ perl ];
  propagatedBuildInputs = [ zlib ];

  preInstall = ''
    patchShebangs man/handle_links
  '';

  # At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
  # had this same problem.  This links it somewhere that mysqlworkbench looks.
  postInstall = ''
    mkdir -p $dev/lib
    mv $out/lib/libzip $dev/lib/libzip
    ( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
  '';

  meta = with stdenv.lib; {
    homepage = https://www.nih.at/libzip;
    description = "A C library for reading, creating and modifying zip archives";
    license = licenses.bsd3;
    platforms = platforms.unix;
  };<commit_msg>libzip: fix tests<commit_after>{ stdenv, fetchurl, perl, zlib }:

stdenv.mkDerivation rec {
  name = "libzip-${version}";
  version = "1.3.0";

  src = fetchurl {
    url = "https://www.nih.at/libzip/${name}.tar.gz";
    sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9";
  };

  postPatch = ''
    patchShebangs test-driver
    patchShebangs man/handle_links
  '';

  outputs = [ "out" "dev" ];

  nativeBuildInputs = [ perl ];
  propagatedBuildInputs = [ zlib ];

  preCheck = ''
    # regress/runtests is a generated file
    patchShebangs regress
  '';

  # At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
  # had this same problem.  This links it somewhere that mysqlworkbench looks.
  postInstall = ''
    mkdir -p $dev/lib
    mv $out/lib/libzip $dev/lib/libzip
    ( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
  '';

  meta = with stdenv.lib; {
    homepage = https://www.nih.at/libzip;
    description = "A C library for reading, creating and modifying zip archives";
    license = licenses.bsd3;
    platforms = platforms.unix;
  };
{'fraction_non_alphanumeric': 0.1315410465674508, 'fraction_numerical': 0.024963994239078253, 'mean_word_length': 3.134920634920635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '6604710', 'n_tokens_mistral': 798, 'n_tokens_neox': 762, 'n_words': 176}