Add support for Hal FDI extensions. This should be helpful to change keymap

inside the X server.

svn path=/nixos/branches/modular-nixos/; revision=15678
This commit is contained in:
Nicolas Pierron 2009-05-20 15:43:43 +00:00
parent 91387275ee
commit e563c97ceb
1 changed files with 23 additions and 0 deletions

View File

@ -14,6 +14,14 @@ let
Whether to start the HAL daemon.
";
};
extraFdi = mkOption {
default = [];
example = [ "/nix/store/.../fdi" ];
description = "
Extend HAL daemon configuration with additionnal paths.
";
};
};
};
};
@ -37,6 +45,15 @@ let
gid = (import ../system/ids.nix).gids.haldaemon;
};
fdi =
if cfg.extraFdi == [] then
hal + "/share/hal/fdi"
else
pkgs.buildEnv {
name = "hal-fdi";
pathsToLink = [ "/preprobe" "/information" "/policy" ];
paths = [ (hal + "/share/hal/fdi") ] ++ cfg.extraFdi;
};
job = {
name = "hal";
@ -57,6 +74,12 @@ let
end script
# HACK ? These environment variables manipulated inside
# 'src'/hald/mmap_cache.c are used for testing the daemon
env HAL_FDI_SOURCE_PREPROBE=${fdi}/preprobe
env HAL_FDI_SOURCE_INFORMATION=${fdi}/information
env HAL_FDI_SOURCE_POLICY=${fdi}/policy
respawn ${hal}/sbin/hald --daemon=no
'';
};