diff options
author | Timo Kaufmann <timokau@zoho.com> | 2020-12-13 18:28:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-13 18:28:21 +0100 |
commit | d6dba0d7c1599a4face8b5cb02f9e469c1c88947 (patch) | |
tree | d5cc2fc93e84f26f161658720b8f4ffbba851ace /pkgs/servers/x11 | |
parent | 0f25eb3e7dc1ad60288f95b7bc9ec8c7ce3959e5 (diff) | |
parent | d3113a62b872286369b76c7a73998d1e84f0354d (diff) | |
download | nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar.gz nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar.bz2 nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar.lz nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar.xz nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.tar.zst nixlib-d6dba0d7c1599a4face8b5cb02f9e469c1c88947.zip |
Merge pull request #100774 from Atemu/startx-improvements
Startx improvements
Diffstat (limited to 'pkgs/servers/x11')
-rw-r--r-- | pkgs/servers/x11/xorg/dont-create-logdir-during-build.patch | 32 | ||||
-rw-r--r-- | pkgs/servers/x11/xorg/overrides.nix | 13 |
2 files changed, 42 insertions, 3 deletions
diff --git a/pkgs/servers/x11/xorg/dont-create-logdir-during-build.patch b/pkgs/servers/x11/xorg/dont-create-logdir-during-build.patch new file mode 100644 index 000000000000..3675292f9c99 --- /dev/null +++ b/pkgs/servers/x11/xorg/dont-create-logdir-during-build.patch @@ -0,0 +1,32 @@ +--- + hw/xfree86/Makefile.am | 1 - + hw/xfree86/Makefile.in | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am +index 9aeaea1..dcca3b8 100644 +--- a/hw/xfree86/Makefile.am ++++ b/hw/xfree86/Makefile.am +@@ -100,7 +100,6 @@ EXTRA_DIST = xorgconf.cpp + + # Without logdir, X will post an error on the terminal and will not start + install-data-local: +- $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir) + if CYGWIN + $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a + endif +diff --git a/hw/xfree86/Makefile.in b/hw/xfree86/Makefile.in +index c4fceee..74da8f1 100644 +--- a/hw/xfree86/Makefile.in ++++ b/hw/xfree86/Makefile.in +@@ -1161,7 +1161,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-local \ + + # Without logdir, X will post an error on the terminal and will not start + install-data-local: +- $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir) + @CYGWIN_TRUE@ $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a + + install-exec-hook: +-- +2.25.4 + 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 ''; }); |