<commit_before>{ lib, stdenv, rustPlatform, fetchFromBitbucket, llvmPackages, Libsystem, SystemConfiguration, installShellFiles }:

rustPlatform.buildRustPackage rec {
  pname = "bore";
  version = "0.3.3";

  src = fetchFromBitbucket {
    owner = "delan";
    repo = "nonymous";
    rev = version;
    sha256 = "0gws1f625izrb3armh6bay1k8l9p9csl37jx03yss1r720k4vn2x";
  };

  cargoSha256 = "1n09gcp1y885lz6g2f73zw3fd0fmv7nwlvaqba2yl0kylzk7naa6";
  cargoBuildFlags = "-p ${pname}";

  # FIXME can’t test --all-targets and --doc in a single invocation
  cargoTestFlags = "--features std --all-targets --workspace";

  nativeBuildInputs = [ installShellFiles ]
    ++ lib.optional stdenv.isDarwin llvmPackages.libclang;

  buildInputs = lib.optionals stdenv.isDarwin [
    Libsystem
    SystemConfiguration
  ];

  LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";

  postInstall = ''
    installManPage $src/bore/doc/bore.1
  '';

  doInstallCheck = true;
  installCheckPhase = ''
    printf '\0\0\0\0\0\0\0\0\0\0\0\0' \
    | $out/bin/bore --decode \
    | grep -q ';; NoError #0 Query 0 0 0 0 flags'
  '';

  meta = with lib; {
    description = "DNS query tool";
    homepage = "https://crates.io/crates/bore";
    license = licenses.isc;
    maintainers = [ maintainers.delan ];
  };
}
<commit_msg>bore: use checkFeatures<commit_after>{ lib, stdenv, rustPlatform, fetchFromBitbucket, llvmPackages, Libsystem, SystemConfiguration, installShellFiles }:

rustPlatform.buildRustPackage rec {
  pname = "bore";
  version = "0.3.3";

  src = fetchFromBitbucket {
    owner = "delan";
    repo = "nonymous";
    rev = version;
    sha256 = "0gws1f625izrb3armh6bay1k8l9p9csl37jx03yss1r720k4vn2x";
  };

  cargoSha256 = "1n09gcp1y885lz6g2f73zw3fd0fmv7nwlvaqba2yl0kylzk7naa6";
  cargoBuildFlags = "-p ${pname}";

  # FIXME can’t test --all-targets and --doc in a single invocation
  checkFeatures = [ "std" ];

  cargoTestFlags = [ "--all-targets" "--workspace" ];

  nativeBuildInputs = [ installShellFiles ]
    ++ lib.optional stdenv.isDarwin llvmPackages.libclang;

  buildInputs = lib.optionals stdenv.isDarwin [
    Libsystem
    SystemConfiguration
  ];

  LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";

  postInstall = ''
    installManPage $src/bore/doc/bore.1
  '';

  doInstallCheck = true;
  installCheckPhase = ''
    printf '\0\0\0\0\0\0\0\0\0\0\0\0' \
    | $out/bin/bore --decode \
    | grep -q ';; NoError #0 Query 0 0 0 0 flags'
  '';

  meta = with lib; {
    description = "DNS query tool";
    homepage = "https://crates.io/crates/bore";
    license = licenses.isc;
    maintainers = [ maintainers.delan ];
  };
}

{'fraction_non_alphanumeric': 0.13558678313710595, 'fraction_numerical': 0.05013292821876187, 'mean_word_length': 3.3973288814691154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '807627', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1011, 'n_words': 180}