Commit e20e4d5d authored by OPNA2608's avatar OPNA2608
Browse files

lomiri.lomiri-indicator-network: Update patching to newer CMake's possibilities

We can just define variables for pkg-config substitution now, no need to hardcode.
parent 9981e1b7
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -47,11 +47,10 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  postPatch = ''
    # Queried via pkg-config, would need to override a prefix variable
    # Needs CMake 3.28 or higher to do as part of the call, https://github.com/NixOS/nixpkgs/pull/275284
    # Override original prefixes
    substituteInPlace data/CMakeLists.txt \
      --replace 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir)' 'set(DBUS_SESSION_BUS_SERVICES_DIR "''${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/services")' \
      --replace 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")'
      --replace-fail 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir)' 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir DEFINE_VARIABLES datadir=''${CMAKE_INSTALL_FULL_SYSCONFDIR})' \
      --replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'
  '';

  strictDeps = true;