Skip to content

Commit e82d126

Browse files
committedJun 28, 2017
nixos/xserver: Don't use exec in xkb-layouts-exist
First of all, thanks to @pbogdan for getting this problem reproduced: 2014db3efcd2a#commitcomment-22815396 Also thanks to @vcunat for bringing this to my attention: 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>
1 parent 35b974a commit e82d126

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎nixos/modules/services/x11/xserver.nix

+7-4
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,13 @@ in
651651
system.extraDependencies = singleton (pkgs.runCommand "xkb-layouts-exist" {
652652
inherit (cfg) layout xkbDir;
653653
} ''
654-
set -x
655-
sed -n -e ':i /^! \(layout\|variant\) *$/ {
656-
:l; n; /^!/bi; s/^ *\([^ ]\+\).*/\1/p; tl
657-
}' "$xkbDir/rules/base.lst" | grep -qxF "$layout" && exec touch "$out"
654+
if sed -n -e ':i /^! \(layout\|variant\) *$/ {
655+
:l; n; /^!/bi; s/^ *\([^ ]\+\).*/\1/p; tl
656+
}' "$xkbDir/rules/base.lst" | grep -qxF "$layout"
657+
then
658+
touch "$out"
659+
exit 0
660+
fi
658661
659662
cat >&2 <<-EOF
660663

0 commit comments

Comments
 (0)
Please sign in to comment.