xorg-server variants: eradicate symlink to /var/tmp

- Fixes #19673; it caused problems in combination with buildEnv.
- As noted, X falls back to /tmp:
  https://github.com/NixOS/nixpkgs/issues/19673#issuecomment-258871876
- 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: 9d1569316.
This commit is contained in:
Vladimír Čunát 2016-12-03 18:07:04 +01:00
parent 64291e4fa2
commit 33abc705b3
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 1 additions and 4 deletions

View file

@ -459,8 +459,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 \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
wrapProgram $out/bin/Xvfb \
@ -510,7 +509,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

View file

@ -25,7 +25,6 @@ overrideDerivation xorgserver (oldAttrs: {
postInstall = ''
rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled
'';
}) // {