xorg.xorgserver: Use substitute in patches instead of postPatch

This commit is contained in:
Quentin Smith 2023-05-03 00:21:49 -04:00
parent 9ae8af51c5
commit 65601cbb21
No known key found for this signature in database
GPG key ID: 04EE05A8FCEFB697

View file

@ -1,6 +1,6 @@
{ abiCompat ? null, { abiCompat ? null,
callPackage, callPackage,
lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages, lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages, substitute,
automake, autoconf, libiconv, libtool, intltool, automake, autoconf, libiconv, libtool, intltool,
freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge, freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge,
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, netbsd, libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, netbsd,
@ -764,14 +764,12 @@ self: super:
name = "revert-fb-changes-2.patch"; name = "revert-fb-changes-2.patch";
}) })
./darwin/bundle_main.patch ./darwin/bundle_main.patch
./darwin/stub.patch (substitute {
src = ./darwin/stub.patch;
replacements = ["--subst-var-by" "XQUARTZ_APP" "${placeholder "out"}/Applications/XQuartz.app"];
})
]; ];
postPatch = attrs.postPatch + ''
substituteInPlace hw/xquartz/mach-startup/stub.c \
--subst-var-by XQUARTZ_APP "$out/Applications/XQuartz.app"
'';
configureFlags = [ configureFlags = [
# note: --enable-xquartz is auto # note: --enable-xquartz is auto
"CPPFLAGS=-I${./darwin/dri}" "CPPFLAGS=-I${./darwin/dri}"