* Use the hal-info package.

svn path=/nixos/trunk/; revision=16693
This commit is contained in:
Eelco Dolstra 2009-08-11 21:16:59 +00:00
parent dc093b57dd
commit 9493ecc2a4
2 changed files with 21 additions and 26 deletions

View File

@ -9,15 +9,11 @@ let
inherit (pkgs) hal; inherit (pkgs) hal;
fdi = fdi = pkgs.buildEnv {
if cfg.extraFdi == [] then name = "hal-fdi";
"${hal}/share/hal/fdi" pathsToLink = [ "/share/hal/fdi" ];
else paths = cfg.packages;
pkgs.buildEnv { };
name = "hal-fdi";
pathsToLink = [ "/preprobe" "/information" "/policy" ];
paths = [ "${hal}/share/hal/fdi" ] ++ cfg.extraFdi;
};
in in
@ -31,17 +27,16 @@ in
enable = mkOption { enable = mkOption {
default = true; default = true;
description = " description = ''
Whether to start the HAL daemon. Whether to start the HAL daemon.
"; '';
}; };
extraFdi = mkOption { packages = mkOption {
default = []; default = [];
example = [ "/nix/store/.../fdi" ]; description = ''
description = " Packages containing additional HAL configuration data.
Extend HAL daemon configuration with additionnal paths. '';
";
}; };
}; };
@ -55,6 +50,8 @@ in
environment.systemPackages = [hal]; environment.systemPackages = [hal];
services.hal.packages = [hal pkgs.hal_info];
users.extraUsers = singleton users.extraUsers = singleton
{ name = "haldaemon"; { name = "haldaemon";
uid = config.ids.uids.haldaemon; uid = config.ids.uids.haldaemon;
@ -79,9 +76,9 @@ in
# !!! HACK? These environment variables manipulated inside # !!! HACK? These environment variables manipulated inside
# 'src'/hald/mmap_cache.c are used for testing the daemon # 'src'/hald/mmap_cache.c are used for testing the daemon
environment = environment =
{ HAL_FDI_SOURCE_PREPROBE = "${fdi}/preprobe"; { HAL_FDI_SOURCE_PREPROBE = "${fdi}/share/hal/fdi/preprobe";
HAL_FDI_SOURCE_INFORMATION = "${fdi}/information"; HAL_FDI_SOURCE_INFORMATION = "${fdi}/share/hal/fdi/information";
HAL_FDI_SOURCE_POLICY = "${fdi}/policy"; HAL_FDI_SOURCE_POLICY = "${fdi}/share/hal/fdi/policy";
}; };
preStart = preStart =

View File

@ -359,10 +359,10 @@ let
]; ];
halConfigFiles = [ halConfigFiles = singleton
(pkgs.writeTextFile { (pkgs.writeTextFile {
name = "hal-policy-keymap"; name = "hal-policy-keymap";
destination = "/policy/30-keymap.fdi"; destination = "/share/hal/fdi/policy/30-keymap.fdi";
text = '' text = ''
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2"> <deviceinfo version="0.2">
@ -380,8 +380,8 @@ let
</device> </device>
</deviceinfo> </deviceinfo>
''; '';
}) });
];
configFile = stdenv.mkDerivation { configFile = stdenv.mkDerivation {
name = "xserver.conf"; name = "xserver.conf";
@ -618,9 +618,7 @@ mkIf cfg.enable {
}; };
}; };
hal = { hal.packages = halConfigFiles;
extraFdi = halConfigFiles;
};
extraJobs = [{ extraJobs = [{
name = "xserver"; name = "xserver";