Unverified Commit a967f2cd authored by Randy Eckenrode's avatar Randy Eckenrode
Browse files

dbus: fix launchd support on Darwin

- Meson tries to detect that `launchctl` is present. Lie to it because
  it will always be present on a Darwin host platform; and
- Install the launch agent plist to `$out` instead of an impure path.
parent 372961a7
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
    "-Dinstall_sysconfdir=${placeholder "out"}/etc"
    "-Ddoxygen_docs=disabled"
    "-Dducktype_docs=disabled"
    "-Dlaunchd_agent_dir=${placeholder "out"}/Library/LaunchAgents"
    "-Dqt_help=disabled"
    "-Drelocation=disabled" # Conflicts with multiple outputs
    "-Dmodular_tests=disabled" # Requires glib
@@ -114,6 +115,13 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.mesonEnable "systemd" enableSystemd)
    "-Dselinux=disabled"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # `launchctl` is only needed at runtime. Lie to `find_program` because it will always be present on a Darwin host.
    "--cross-file=${writeText "darwin.ini" ''
      [binaries]
      launchctl = 'true'
    ''}"
  ]
  ++ lib.optionals enableSystemd [
    "--cross-file=${writeText "crossfile.ini" ''
      [binaries]