diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-11 21:00:42 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-08-11 21:00:42 +0000 |
commit | 17828d84429ccb3f8fae99dedd98ef36a26e1a2f (patch) | |
tree | 88609c86f0e90377ab0b5f0f137407774d3180b8 /pkgs/os-specific/linux/udev | |
parent | 17132958a9564792b7b99410f79f4887e5d680ea (diff) | |
download | nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar.gz nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar.bz2 nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar.lz nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar.xz nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.tar.zst nixlib-17828d84429ccb3f8fae99dedd98ef36a26e1a2f.zip |
* udev: updated to 145. Dropped support for doing a static build
since we don't need it anymore. Patched the udev rules/helper programs for CD-ROM symlink generation and firmware loading so that we don't have to provide our own. svn path=/nixpkgs/trunk/; revision=16684
Diffstat (limited to 'pkgs/os-specific/linux/udev')
-rw-r--r-- | pkgs/os-specific/linux/udev/default.nix | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/pkgs/os-specific/linux/udev/default.nix b/pkgs/os-specific/linux/udev/default.nix index 9e349391316f..855ed575a917 100644 --- a/pkgs/os-specific/linux/udev/default.nix +++ b/pkgs/os-specific/linux/udev/default.nix @@ -1,36 +1,49 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, gperf, pkgconfig, glib, acl, libusb, usbutils, pciutils}: -stdenv.mkDerivation { - name = "udev-125"; +stdenv.mkDerivation rec { + name = "udev-145"; src = fetchurl { - url = mirror://kernel/linux/utils/kernel/hotplug/udev-125.tar.bz2; - sha256 = "1w75c6vaqw8587djd8g380h1jrbj7fx9441bvvy4gj9jz21r00ks"; + url = "mirror://kernel/linux/utils/kernel/hotplug/${name}.tar.bz2"; + sha256 = "1zmibp6n7d582fqx8vmg9vb2a1435hghfpz36056bc25ccwf7yiv"; }; - # "DESTDIR=/" is a hack to prevent "make install" from trying to - # mess with /dev. - preBuild = + buildInputs = [gperf pkgconfig glib acl libusb usbutils]; + + configureFlags = "--with-pci-ids-path=${pciutils}/share/pci.ids"; + + preConfigure = '' - makeFlagsArray=(prefix=$out usrbindir=$out/bin usrsbindir=$out/sbin usrlibdir=$out/lib \ - mandir=$out/share/man includedir=$out/include \ - 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"}" - INSTALL='install -c' DESTDIR=/ \ - ${if stdenv ? isStatic then "USE_STATIC=true SHLIB= VOLUME_ID_STATIC=true" else ""}) - - substituteInPlace udev_rules.c --replace /lib/udev $out/lib/udev - '' - - + (if stdenv ? isStatic then + substituteInPlace extras/keymap/Makefile.in \ + --replace /usr/include ${stdenv.glibc}/include + ''; + + postInstall = '' - # `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 ""); + # Install some rules that really should be installed by default. + for i in 40-alsa.rules 40-infiniband.rules 40-isdn.rules 40-pilot-links.rules 64-device-mapper.rules 64-md-raid.rules; do + cp rules/packages/$i $out/libexec/rules.d/ + done + + # 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 - preInstall = '' - installFlagsArray=(udevdir=$TMPDIR/dummy) - ''; + # Don't set PATH to /bin:/sbin; won't work in NixOS. + substituteInPlace $out/libexec/rule_generator.functions \ + --replace 'PATH=' '#PATH=' + # Don't hardcore the FIRMWARE_DIRS variable; obtain it from the + # environment of the caller. + sed '3,4d' -i $out/libexec/firmware.sh + ''; + meta = { homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html; description = "Udev manages the /dev filesystem"; |