Skip to content

Commit

Permalink
xorg-server variants: eradicate symlink to /var/tmp
Browse files Browse the repository at this point in the history
- Fixes #19673; it caused problems in combination with buildEnv.
- As noted, X falls back to /tmp:
  #19673 (comment)
- Removing the directory is still required, as X would attempt to write
  into it if allowed - and probably succeed in case the user set
  nix.readOnlyStore = false; (X runs as root).
- Archeology link: 9d15693.

(cherry picked from commit 33abc70)
  • Loading branch information
vcunat committed Dec 18, 2016
1 parent 84a3c52 commit fa20c0c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions pkgs/servers/x11/xorg/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ in
"--enable-glamor"
];
postInstall = ''
rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled
rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it
wrapProgram $out/bin/Xephyr \
--set XKB_BINDIR "${xorg.xkbcomp}/bin" \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
Expand Down Expand Up @@ -506,7 +505,6 @@ in
'';
postInstall = ''
rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled
cp -rT ${darwinOtherX}/bin $out/bin
rm -f $out/bin/X
Expand Down
1 change: 0 additions & 1 deletion pkgs/servers/x11/xorg/xwayland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ overrideDerivation xorgserver (oldAttrs: {

postInstall = ''
rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled
'';

}) // {
Expand Down

0 comments on commit fa20c0c

Please sign in to comment.