2005-08-19 15:11:05 +01:00
|
|
|
{stdenv, fetchurl}:
|
2008-07-31 15:46:11 +01:00
|
|
|
|
2008-07-06 21:56:58 +01:00
|
|
|
stdenv.mkDerivation {
|
2008-07-31 15:46:11 +01:00
|
|
|
name = "udev-125";
|
2008-02-04 13:04:16 +00:00
|
|
|
|
2008-07-06 21:56:58 +01:00
|
|
|
src = fetchurl {
|
2008-07-31 15:46:11 +01:00
|
|
|
url = mirror://kernel/linux/utils/kernel/hotplug/udev-125.tar.bz2;
|
|
|
|
sha256 = "1w75c6vaqw8587djd8g380h1jrbj7fx9441bvvy4gj9jz21r00ks";
|
2005-08-19 15:11:05 +01:00
|
|
|
};
|
2008-07-06 21:56:58 +01:00
|
|
|
|
2008-02-04 13:04:16 +00:00
|
|
|
# "DESTDIR=/" is a hack to prevent "make install" from trying to
|
|
|
|
# mess with /dev.
|
2008-08-08 20:54:48 +01:00
|
|
|
preBuild =
|
|
|
|
''
|
|
|
|
makeFlagsArray=(prefix=$out usrbindir=$out/bin usrsbindir=$out/sbin usrlibdir=$out/lib \
|
|
|
|
mandir=$out/share/man includedir=$out/include \
|
2008-08-11 10:38:22 +01:00
|
|
|
EXTRAS="extras/volume_id extras/ata_id extras/edd_id extras/floppy extras/path_id ${if stdenv ? isKlibc then "" else "extras/scsi_id"} extras/usb_id ${if stdenv ? isKlibc then "" else "extras/cdrom_id"}"
|
2008-08-08 20:54:48 +01:00
|
|
|
INSTALL='install -c' DESTDIR=/ \
|
|
|
|
${if stdenv ? isStatic then "USE_STATIC=true SHLIB= VOLUME_ID_STATIC=true" else ""})
|
2008-07-02 18:07:26 +01:00
|
|
|
|
2008-08-08 20:54:48 +01:00
|
|
|
substituteInPlace udev_rules.c --replace /lib/udev $out/lib/udev
|
|
|
|
''
|
|
|
|
|
|
|
|
+ (if stdenv ? isStatic then
|
|
|
|
''
|
|
|
|
# `make install' would cause the shared library to be installed, which we don't build.
|
|
|
|
substituteInPlace extras/volume_id/lib/Makefile --replace 'install:' 'disabled:'
|
|
|
|
'' else "");
|
2008-02-04 13:04:16 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
installFlagsArray=(udevdir=$TMPDIR/dummy)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html;
|
|
|
|
description = "Udev manages the /dev filesystem";
|
|
|
|
};
|
2005-08-19 15:11:05 +01:00
|
|
|
}
|