xorg.xorgserver: substitute outside of patches

This commit is contained in:
Weijia Wang 2023-05-14 14:02:10 +02:00
parent f05b051a58
commit 271735a0b9

View file

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