<commit_before>{stdenv, fetchurl, hotplugSupport ? false, libusb ? null,
	gt68xxFirmware ? null}:

assert hotplugSupport -> stdenv.system == "i686-linux";

stdenv.mkDerivation {
  name = "sane-backends-1.0.20";
  
  src = fetchurl {
    url = ftp://ftp.sane-project.org/pub/sane/sane-backends-1.0.20/sane-backends-1.0.20.tar.gz;
    sha256 = "0fixmq3jbz77zcy2cikb882kz8bq3n40n0jaykiczfcjc4g57ccg";
  };
  
  udevSupport = hotplugSupport;

  buildInputs = if libusb != null then [libusb] else [];

  postInstall = ''
    if test "$udevSupport" = "1"; then
      ensureDir $out/etc/udev/rules.d/
      cp tools/udev/libsane.rules $out/etc/udev/rules.d/60-libsane.rules
    fi
  '';

  preInstall =
    if gt68xxFirmware != null then 
      "mkdir -p \${out}/share/sane/gt68xx ; ln -s " +  <commit_msg>sane-backends update provided by <NAME><commit_after>{stdenv, fetchurl, hotplugSupport ? false, libusb ? null,
	gt68xxFirmware ? null}:

assert hotplugSupport -> stdenv.system == "i686-linux";

stdenv.mkDerivation {
  name = "sane-backends-1.0.21";
  
  src = fetchurl {
    url = ftp://ftp.sane-project.org/pub/sane/sane-backends-1.0.21/sane-backends-1.0.21.tar.gz;
    sha256 = "12wl4a86hxwlrx46lm5z6lw4id3j8wi82yv3khxcz5sqjai2ykp4";
  };
  
  udevSupport = hotplugSupport;

  buildInputs = if libusb != null then [libusb] else [];

  postInstall = ''
    if test "$udevSupport" = "1"; then
      ensureDir $out/etc/udev/rules.d/
      cp tools/udev/libsane.rules $out/etc/udev/rules.d/60-libsane.rules
    fi
  '';

  preInstall =
    if gt68xxFirmware != null then 
      "mkdir -p \${out}/share/sane/gt68xx ; ln -s " +  
{'fraction_non_alphanumeric': 0.14716748768472906, 'fraction_numerical': 0.054187192118226604, 'mean_word_length': 3.145408163265306, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '955840', 'n_tokens_mistral': 725, 'n_tokens_neox': 674, 'n_words': 108}