<commit_before>{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null
, pkgconfig ? null, gt68xxFirmware ? null, snapscanFirmware ? null
}:

assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");

let
  firmware = gt68xxFirmware { inherit fetchurl; };
in
stdenv.mkDerivation rec {
  version = "1.0.24";
  name = "sane-backends-${version}";

  src = fetchurl {
    url = "https://alioth.debian.org/frs/download.php/file/3958/${name}.tar.gz";
    curlOpts = "--insecure";
    sha256 = "0ba68m6bzni54axjk15i51rya7hfsdliwvqyan5msl7iaid0iir7";
  };

  udevSupport = hotplugSupport;

  configureFlags = stdenv.lib.optional (libusb != null) "--enable-libusb_1_0";

  buildInputs = []
    ++ stdenv.lib.optional (libusb != null) libusb
    ++ stdenv.lib.optional (libv4l != null) libv4l
    ++ stdenv.lib.optional (pkgconfig != null) pkgconfig
    ;

  postInstall = ''
    if test "$udevSupport" = "1"; then
      mkdir -p $out/etc/udev/rules.d/
      ./tools/sane-desc -m udev > $out/etc/udev/rules.d/60-libsane.rules || \
      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 " + firmware.fw +
      " \${out}/share/sane/gt68xx/" + firmware.name
    else if snapscanFirmware != null then
      "mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
      " \${out}/share/sane/snapscan/your-firmwarefile.bin"
    else "";

  meta = {
    homepage = "http://www.sane-project.org/";
    description = "Scanner Access Now Easy";
    license = "GPLv2+";

    maintainers = [ stdenv.lib.maintainers.simons ];
    platforms = stdenv.lib.platforms.linux;
  };
}
<commit_msg>sane-backends: Add extra source url<commit_after>{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null
, pkgconfig ? null, gt68xxFirmware ? null, snapscanFirmware ? null
}:

assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");

let
  firmware = gt68xxFirmware { inherit fetchurl; };
in
stdenv.mkDerivation rec {
  version = "1.0.24";
  name = "sane-backends-${version}";

  src = fetchurl {
    urls = [
      "http://pkgs.fedoraproject.org/repo/pkgs/sane-backends/sane-backends-1.0.24.tar.gz/1ca68e536cd7c1852322822f5f6ac3a4/${name}.tar.gz"
      "https://alioth.debian.org/frs/download.php/file/3958/${name}.tar.gz"
    ];
    curlOpts = "--insecure";
    sha256 = "0ba68m6bzni54axjk15i51rya7hfsdliwvqyan5msl7iaid0iir7";
  };

  udevSupport = hotplugSupport;

  configureFlags = stdenv.lib.optional (libusb != null) "--enable-libusb_1_0";

  buildInputs = []
    ++ stdenv.lib.optional (libusb != null) libusb
    ++ stdenv.lib.optional (libv4l != null) libv4l
    ++ stdenv.lib.optional (pkgconfig != null) pkgconfig
    ;

  postInstall = ''
    if test "$udevSupport" = "1"; then
      mkdir -p $out/etc/udev/rules.d/
      ./tools/sane-desc -m udev > $out/etc/udev/rules.d/60-libsane.rules || \
      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 " + firmware.fw +
      " \${out}/share/sane/gt68xx/" + firmware.name
    else if snapscanFirmware != null then
      "mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
      " \${out}/share/sane/snapscan/your-firmwarefile.bin"
    else "";

  meta = {
    homepage = "http://www.sane-project.org/";
    description = "Scanner Access Now Easy";
    license = "GPLv2+";

    maintainers = [ stdenv.lib.maintainers.simons ];
    platforms = stdenv.lib.platforms.linux;
  };
}

{'fraction_non_alphanumeric': 0.16076736017292623, 'fraction_numerical': 0.035936233450418804, 'mean_word_length': 3.050328227571116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4322855', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1444, 'n_words': 241}