<commit_before>args: with args;

assert stdenv ? glibc;

stdenv.mkDerivation rec {
  name = "hal-0.5.13";
  
  src = fetchurl {
    url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
    sha256 = "1by8z7vy1c1m3iyh57rlqx6rah5gj6kx3ba30s9305bnffij5kzb";
  };
  
  buildInputs = [
    pkgconfig python pciutils expat libusb dbus.libs dbus_glib glib
    libuuid perl perlXMLParser gettext zlib gperf
    # !!! libsmbios is broken; it doesn't install headers.
  ];

  # !!! Hm, maybe the pci/usb.ids location should be in /etc, so that
  # we don't have to rebuild HAL when we update the PCI/USB IDs.  
  configureFlags = ''
    --with-pci-ids=${pciutils}/share
    --with-usb-ids=${usbutils}/share
    --localstatedir=/var
    --with-eject=${eject}/bin/eject
    --with-linux-input-header=${stdenv.glibc}/include/linux/input.h
    --disable-policy-kit
  '';

  propagatedBuildInputs = [libusb libsmbios];

  preConfigure = ''
    for i in hald/linux/probing/probe-smbios.c hald/linux/osspec.c \
             hald/linux/coldplug.c hald/linux/blockdev.c
    do
      substituteInPlace $i \
        --replace /usr/sbin/dmidecode ${dmidecode}/sbin/dmidecode \
        --replace /sbin/udevadm ${udev}/sbin/udevadm
    done
  '';
}
<commit_msg>* Enable auto-mounting/unmounting of optical media and USB sticks   (e.g. in KDE).<commit_after>args: with args;

assert stdenv ? glibc;

stdenv.mkDerivation rec {
  name = "hal-0.5.13";
  
  src = fetchurl {
    url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
    sha256 = "<KEY>";
  };
  
  buildInputs = [
    pkgconfig python pciutils expat libusb dbus.libs dbus_glib glib
    libuuid perl perlXMLParser gettext zlib gperf
    # !!! libsmbios is broken; it doesn't install headers.
  ];

  # !!! Hm, maybe the pci/usb.ids location should be in /etc, so that
  # we don't have to rebuild HAL when we update the PCI/USB IDs.  
  configureFlags = ''
    --with-pci-ids=${pciutils}/share
    --with-usb-ids=${usbutils}/share
    --localstatedir=/var
    --with-eject=${eject}/bin/eject
    --with-linux-input-header=${stdenv.glibc}/include/linux/input.h
    --disable-policy-kit
  '';

  propagatedBuildInputs = [libusb libsmbios];

  preConfigure = ''
    for i in hald/linux/probing/probe-smbios.c hald/linux/osspec.c \
             hald/linux/coldplug.c hald/linux/blockdev.c \
             tools/hal-storage-mount.c ./tools/hal-storage-shared.c
    do
      substituteInPlace $i \
        --replace /usr/sbin/dmidecode ${dmidecode}/sbin/dmidecode \
        --replace /sbin/udevadm ${udev}/sbin/udevadm \
        --replace /bin/mount ${utillinuxng}/bin/mount \
        --replace /bin/umount ${utillinuxng}/bin/umount
    done
  '';
}

{'fraction_non_alphanumeric': 0.1400445765230312, 'fraction_numerical': 0.01225854383358098, 'mean_word_length': 2.6689373297002725, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6068295', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1002, 'n_words': 197}