Unverified Commit 65601cbb authored by Quentin Smith's avatar Quentin Smith
Browse files

xorg.xorgserver: Use substitute in patches instead of postPatch

parent 9ae8af51
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
{ abiCompat ? null,
  callPackage,
  lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
  lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages, substitute,
  automake, autoconf, libiconv, libtool, intltool,
  freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge,
  libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, netbsd,
@@ -764,14 +764,12 @@ self: super:
            name = "revert-fb-changes-2.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 = [
          # note: --enable-xquartz is auto
          "CPPFLAGS=-I${./darwin/dri}"