add udev rules, but make them optional (default == off)

svn path=/nixpkgs/trunk/; revision=4643
This commit is contained in:
Armijn Hemel 2006-01-31 16:00:05 +00:00
parent 761dceaaae
commit 0d3400daf9
3 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,3 @@
# udev rule to create /dev/input/wacomN for wacom tablets
KERNEL="event*", SYSFS{manufacturer}="WACOM", NAME="input/%k", SYMLINK="input/wacom%e"

View File

@ -0,0 +1,12 @@
source $stdenv/setup
postInstall() {
if test -n "$udevSupport"; then
ensureDir $out/etc/udev/rules.d
cp $udevRules $out/etc/udev/rules.d/10-wacom.rules
fi
}
postInstall=postInstall
genericBuild

View File

@ -1,10 +1,13 @@
{stdenv, fetchurl, libX11, libXi}:
{stdenv, fetchurl, libX11, libXi, udevSupport ? false}:
stdenv.mkDerivation {
name = "linuxwacom-0.7.2";
builder = ./builder.sh;
src = fetchurl {
url = http://surfnet.dl.sourceforge.net/sourceforge/linuxwacom/linuxwacom-0.7.2.tar.bz2;
md5 = "3f6290101d5712a24097243ca9f092ed";
};
buildInputs = [libX11 libXi];
udevRules = ./10-wacom.rules;
inherit udevSupport;
}