summaryrefslogtreecommitdiffstats
path: root/pkgs/servers/x11/xorg/overrides.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/x11/xorg/overrides.nix')
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index 02dfb7ee1f55..ddf0aacdf07d 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -571,7 +571,7 @@ self: super:
attrs =
if (abiCompat == null || lib.hasPrefix abiCompat version) then
attrs_passed // {
- buildInputs = attrs_passed.buildInputs ++ [ libdrm.dev ]; patchPhase = ''
+ buildInputs = attrs_passed.buildInputs ++ [ libdrm.dev ]; postPatch = ''
for i in dri3/*.c
do
sed -i -e "s|#include <drm_fourcc.h>|#include <libdrm/drm_fourcc.h>|" $i
@@ -626,6 +626,12 @@ self: super:
if (!isDarwin)
then {
outputs = [ "out" "dev" ];
+ patches = [
+ # The build process tries to create the specified logdir when building.
+ #
+ # We set it to /var/log which can't be touched from inside the sandbox causing the build to hard-fail
+ ./dont-create-logdir-during-build.patch
+ ];
buildInputs = commonBuildInputs ++ [ libdrm mesa ];
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ libpciaccess epoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
udev
@@ -642,6 +648,7 @@ self: super:
"--with-xkb-bin-directory=${self.xkbcomp}/bin"
"--with-xkb-path=${self.xkeyboardconfig}/share/X11/xkb"
"--with-xkb-output=$out/share/X11/xkb/compiled"
+ "--with-log-dir=/var/log"
"--enable-glamor"
] ++ lib.optionals stdenv.hostPlatform.isMusl [
"--disable-tls"
@@ -758,8 +765,8 @@ self: super:
];
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xauth ]
++ lib.optionals isDarwin [ self.libX11 self.xorgproto ];
- prePatch = ''
- sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
+ postFixup = ''
+ substituteInPlace $out/bin/startx --replace $out/etc/X11/xinit/xserverrc /etc/X11/xinit/xserverrc
'';
});