mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
nixos/kanata: check the config file at build time
Before this patch, checking the config file is done at runtime. Doing so at build time shortens the feedback loop[1][2]. [1]: https://github.com/NixOS/nixpkgs/issues/278135 [2]: https://github.com/jtroo/kanata/issues/689
This commit is contained in:
parent
ed7d332850
commit
1d93534ec4
@ -86,14 +86,20 @@ let
|
||||
in
|
||||
optionalString ((length devices) > 0) "linux-dev (${devicesString})";
|
||||
|
||||
mkConfig = name: keyboard: pkgs.writeText "${mkName name}-config.kdb" ''
|
||||
(defcfg
|
||||
${keyboard.extraDefCfg}
|
||||
${mkDevices keyboard.devices}
|
||||
linux-continue-if-no-devs-found yes)
|
||||
mkConfig = name: keyboard: pkgs.writeTextFile {
|
||||
name = "${mkName name}-config.kdb";
|
||||
text = ''
|
||||
(defcfg
|
||||
${keyboard.extraDefCfg}
|
||||
${mkDevices keyboard.devices}
|
||||
linux-continue-if-no-devs-found yes)
|
||||
|
||||
${keyboard.config}
|
||||
'';
|
||||
${keyboard.config}
|
||||
'';
|
||||
checkPhase = ''
|
||||
${getExe cfg.package} --cfg "$target" --check --debug
|
||||
'';
|
||||
};
|
||||
|
||||
mkService = name: keyboard: nameValuePair (mkName name) {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
Loading…
Reference in New Issue
Block a user