anchor.diff:      "-DUSE_SYSTEM_MALLOC=ON"
     ] ++ lib.optionals (!stdenv.isLinux) [
       "-DUSE_SYSTEMD=OFF"
  -  ] ++ lib.optional (stdenv.isLinux && enableGLES) "-DENABLE_GLES2=ON";
  +  ] ++ lib.optionals (stdenv.isLinux && enableGLES) [
  +    "-DENABLE_GLES2=ON"
  +  ];
   
     postPatch = ''
       patchShebangs .
  
positive.code: , lcms2
  , libmanette
  , openjpeg
  , enableGeoLocation ? true
  , geoclue2
  , sqlite
  , enableGLES ? true
  
negative.code:     # (We pick just that one because using the other headers from `sdk` is not
      # compatible with our C++ standard library. This header is already in
      # the standard library on aarch64)
      runCommand "${pname}_headers" { } ''
        install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h
      ''
    ) ++ lib.optionals stdenv.isLinux [
      bubblewrap
      libseccomp
      libmanette
      systemd
      wayland
      xdg-dbus-proxy
    ] ++ lib.optionals enableGeoLocation [
      geoclue2
    ] ++ lib.optionals withLibsecret [
      libsecret
    ];
  
    propagatedBuildInputs = [
      gtk3
      libsoup
    ];
  
    cmakeFlags = let
      cmakeBool = x: if x then "ON" else "OFF";
    in [
      "-DENABLE_INTROSPECTION=ON"
      "-DPORT=GTK"
      "-DUSE_LIBHYPHEN=OFF"
      "-DUSE_WPE_RENDERER=OFF"
      "-DUSE_SOUP2=${cmakeBool (lib.versions.major libsoup.version == "2")}"
      "-DUSE_LIBSECRET=${cmakeBool withLibsecret}"
    ] ++ lib.optionals stdenv.isDarwin [
      "-DENABLE_GAMEPAD=OFF"
      "-DENABLE_GTKDOC=OFF"
  