mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/xserver: Don't use exec in xkb-layouts-exist
First of all, thanks to @pbogdan for getting this problem reproduced: https://github.com/NixOS/nixpkgs/commit/2014db3efcd2a#commitcomment-22815396 Also thanks to @vcunat for bringing this to my attention: https://github.com/NixOS/nixpkgs/commit/44c64fef16ed5#commitcomment-22813503 Although it is not entirely clear why Nix has killed the build prior to finishing, it seems to be related to the process substition I was using. So instead of using "exec touch", let's wrap this inside an if so we don't exit too early. Tested this against all sub-tests in nixos/tests/keymap.nix and also a few configurations with wrong keyboard layout definitions. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
35b974a8e9
commit
e82d126212
1 changed files with 7 additions and 4 deletions
|
@ -651,10 +651,13 @@ in
|
||||||
system.extraDependencies = singleton (pkgs.runCommand "xkb-layouts-exist" {
|
system.extraDependencies = singleton (pkgs.runCommand "xkb-layouts-exist" {
|
||||||
inherit (cfg) layout xkbDir;
|
inherit (cfg) layout xkbDir;
|
||||||
} ''
|
} ''
|
||||||
set -x
|
if sed -n -e ':i /^! \(layout\|variant\) *$/ {
|
||||||
sed -n -e ':i /^! \(layout\|variant\) *$/ {
|
:l; n; /^!/bi; s/^ *\([^ ]\+\).*/\1/p; tl
|
||||||
:l; n; /^!/bi; s/^ *\([^ ]\+\).*/\1/p; tl
|
}' "$xkbDir/rules/base.lst" | grep -qxF "$layout"
|
||||||
}' "$xkbDir/rules/base.lst" | grep -qxF "$layout" && exec touch "$out"
|
then
|
||||||
|
touch "$out"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
cat >&2 <<-EOF
|
cat >&2 <<-EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue