2010-05-19 14:26:09 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, python, pciutils, expat
|
|
|
|
, libusb, dbus, dbus_glib, glib, libuuid, perl
|
|
|
|
, perlXMLParser, gettext, zlib, gperf, consolekit, policykit
|
|
|
|
, libsmbios, dmidecode, udev, utillinuxng, pmutils, usbutils
|
2010-10-18 19:50:24 +02:00
|
|
|
, eject, upstart
|
2010-05-19 14:26:09 +02:00
|
|
|
}:
|
2007-06-05 17:57:26 +02:00
|
|
|
|
2009-04-28 16:08:18 +02:00
|
|
|
assert stdenv ? glibc;
|
|
|
|
|
2010-08-29 12:00:37 +02:00
|
|
|
let
|
|
|
|
isPC = stdenv.isi686 || stdenv.isx86_64;
|
|
|
|
changeDmidecode = if isPC then
|
|
|
|
"--replace /usr/sbin/dmidecode ${dmidecode}/sbin/dmidecode"
|
|
|
|
else "";
|
|
|
|
in
|
2009-04-28 01:01:20 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-07-18 23:52:10 +02:00
|
|
|
name = "hal-0.5.14";
|
2009-09-26 01:05:53 +02:00
|
|
|
|
2007-06-05 17:57:26 +02:00
|
|
|
src = fetchurl {
|
2009-04-28 01:01:20 +02:00
|
|
|
url = "http://hal.freedesktop.org/releases/${name}.tar.gz";
|
2010-07-18 23:52:10 +02:00
|
|
|
sha256 = "00ld3afcbh4ckb8sli63mm2w69zh6ip4axhy1lxyybgiabxaqfij";
|
2007-06-05 17:57:26 +02:00
|
|
|
};
|
2010-05-19 14:26:15 +02:00
|
|
|
|
2007-06-05 17:57:26 +02:00
|
|
|
buildInputs = [
|
2008-02-02 21:41:06 +01:00
|
|
|
pkgconfig python pciutils expat libusb dbus.libs dbus_glib glib
|
2009-08-11 23:03:53 +02:00
|
|
|
libuuid perl perlXMLParser gettext zlib gperf
|
2009-11-08 01:32:12 +01:00
|
|
|
consolekit policykit
|
2010-08-21 19:11:07 +02:00
|
|
|
];
|
2007-06-05 17:57:26 +02:00
|
|
|
|
|
|
|
# !!! Hm, maybe the pci/usb.ids location should be in /etc, so that
|
2010-05-19 14:26:15 +02:00
|
|
|
# we don't have to rebuild HAL when we update the PCI/USB IDs.
|
2009-04-28 01:01:20 +02:00
|
|
|
configureFlags = ''
|
2007-06-09 21:47:20 +02:00
|
|
|
--with-pci-ids=${pciutils}/share
|
|
|
|
--with-usb-ids=${usbutils}/share
|
2007-06-05 17:57:26 +02:00
|
|
|
--localstatedir=/var
|
2007-06-08 00:02:12 +02:00
|
|
|
--with-eject=${eject}/bin/eject
|
2009-08-11 23:03:53 +02:00
|
|
|
--with-linux-input-header=${stdenv.glibc}/include/linux/input.h
|
2009-09-26 20:56:53 +02:00
|
|
|
--enable-umount-helper
|
2009-04-28 01:01:20 +02:00
|
|
|
'';
|
2007-06-05 17:57:26 +02:00
|
|
|
|
2009-11-08 01:32:12 +01:00
|
|
|
propagatedBuildInputs = [ libusb ]
|
2010-09-03 10:16:39 +02:00
|
|
|
++ stdenv.lib.optional isPC libsmbios;
|
2008-03-06 14:06:32 +01:00
|
|
|
|
2009-04-28 01:01:20 +02:00
|
|
|
preConfigure = ''
|
2009-08-11 23:03:53 +02:00
|
|
|
for i in hald/linux/probing/probe-smbios.c hald/linux/osspec.c \
|
2009-08-17 04:04:26 +02:00
|
|
|
hald/linux/coldplug.c hald/linux/blockdev.c \
|
2009-09-26 22:29:26 +02:00
|
|
|
tools/hal-storage-mount.c ./tools/hal-storage-shared.c \
|
|
|
|
tools/hal-system-power-pm-is-supported.c \
|
|
|
|
tools/linux/hal-*-linux
|
2009-08-11 23:03:53 +02:00
|
|
|
do
|
|
|
|
substituteInPlace $i \
|
2010-08-29 12:00:37 +02:00
|
|
|
${changeDmidecode} \
|
2010-05-19 14:26:12 +02:00
|
|
|
${if udev != null then "--replace /sbin/udevadm ${udev}/sbin/udevadm" else ""} \
|
2009-08-17 04:04:26 +02:00
|
|
|
--replace /bin/mount ${utillinuxng}/bin/mount \
|
2009-09-26 22:29:26 +02:00
|
|
|
--replace /bin/umount ${utillinuxng}/bin/umount \
|
|
|
|
--replace /usr/bin/pm-is-supported ${pmutils}/bin/pm-is-supported \
|
2010-10-18 19:50:24 +02:00
|
|
|
--replace /usr/sbin/pm ${pmutils}/sbin/pm \
|
|
|
|
--replace /sbin/shutdown ${upstart}/sbin/shutdown
|
2009-08-11 23:03:53 +02:00
|
|
|
done
|
2009-04-28 01:01:20 +02:00
|
|
|
'';
|
2009-09-26 20:56:53 +02:00
|
|
|
|
|
|
|
installFlags = "slashsbindir=$(out)/sbin";
|
2007-06-05 17:57:26 +02:00
|
|
|
}
|