2009-10-06 07:43:51 +02:00
|
|
|
{stdenv, fetchurl, gperf, pkgconfig, glib, acl,
|
|
|
|
libusb, usbutils, pciutils, ...}:
|
2008-07-31 16:46:11 +02:00
|
|
|
|
2009-08-12 15:36:36 +02:00
|
|
|
assert stdenv ? glibc;
|
|
|
|
|
2009-08-11 23:00:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-05-15 11:55:22 +02:00
|
|
|
name = "udev-154";
|
2008-02-04 14:04:16 +01:00
|
|
|
|
2008-07-06 22:56:58 +02:00
|
|
|
src = fetchurl {
|
2009-08-11 23:00:42 +02:00
|
|
|
url = "mirror://kernel/linux/utils/kernel/hotplug/${name}.tar.bz2";
|
2010-05-15 11:55:22 +02:00
|
|
|
sha256 = "1aw5vn96gasvkjh6nfivaf68l6ph33y63zf7gnp3mc7c7zfncm0c";
|
2005-08-19 16:11:05 +02:00
|
|
|
};
|
2008-07-06 22:56:58 +02:00
|
|
|
|
2009-08-11 23:00:42 +02:00
|
|
|
buildInputs = [gperf pkgconfig glib acl libusb usbutils];
|
|
|
|
|
2010-05-15 11:54:35 +02:00
|
|
|
configureFlags = "--with-pci-ids-path=${pciutils}/share/pci.ids
|
|
|
|
--disable-introspection
|
2010-05-15 11:54:42 +02:00
|
|
|
--with-firmware-path=/root/test-firmware:/var/run/current-system/firmware";
|
2009-08-11 23:00:42 +02:00
|
|
|
|
|
|
|
postInstall =
|
2008-08-08 21:54:48 +02:00
|
|
|
''
|
2009-08-11 23:00:42 +02:00
|
|
|
# Install some rules that really should be installed by default.
|
2010-05-15 11:54:35 +02:00
|
|
|
cp rules/packages/40-pilot-links.rules $out/libexec/rules.d/
|
2009-08-11 23:00:42 +02:00
|
|
|
|
|
|
|
# The path to rule_generator.functions in write_cd_rules and
|
|
|
|
# write_net_rules is broken. Also, don't store the mutable
|
|
|
|
# persistant rules in /etc/udev/rules.d but in
|
|
|
|
# /var/lib/udev/rules.d.
|
|
|
|
for i in $out/libexec/write_cd_rules $out/libexec/write_net_rules; do
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace /lib/udev $out/libexec \
|
|
|
|
--replace /etc/udev/rules.d /var/lib/udev/rules.d
|
|
|
|
done
|
2008-02-04 14:04:16 +01:00
|
|
|
|
2009-08-11 23:00:42 +02:00
|
|
|
# Don't set PATH to /bin:/sbin; won't work in NixOS.
|
2010-05-15 11:54:35 +02:00
|
|
|
sed -e '/PATH=/d' -i $out/libexec/rule_generator.functions
|
2009-08-17 02:35:18 +02:00
|
|
|
|
|
|
|
ln -s $out/lib/ConsoleKit $out/etc/ConsoleKit
|
2009-08-11 23:00:42 +02:00
|
|
|
'';
|
|
|
|
|
2008-02-04 14:04:16 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html;
|
|
|
|
description = "Udev manages the /dev filesystem";
|
|
|
|
};
|
2005-08-19 16:11:05 +02:00
|
|
|
}
|