Unverified Commit a7aedde2 authored by Vlad M.'s avatar Vlad M. Committed by GitHub
Browse files

mako: include systemd user service (#340872)

parents bbf4cf5e df4c7015
Loading
Loading
Loading
Loading
+52 −21
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, scdoc
, systemd
, pango
, cairo
, gdk-pixbuf
, jq
, bash
, wayland
, wayland-scanner
, wayland-protocols
, wrapGAppsHook3
{
  lib,
  stdenv,
  fetchFromGitHub,
  meson,
  ninja,
  pkg-config,
  scdoc,
  systemd,
  pango,
  cairo,
  gdk-pixbuf,
  jq,
  bash,
  wayland,
  wayland-scanner,
  wayland-protocols,
  wrapGAppsHook3,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -30,8 +31,22 @@ stdenv.mkDerivation (finalAttrs: {

  strictDeps = true;
  depsBuildBuild = [ pkg-config ];
  nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-protocols wrapGAppsHook3 wayland-scanner ];
  buildInputs = [ systemd pango cairo gdk-pixbuf wayland ];
  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    scdoc
    wayland-protocols
    wrapGAppsHook3
    wayland-scanner
  ];
  buildInputs = [
    systemd
    pango
    cairo
    gdk-pixbuf
    wayland
  ];

  mesonFlags = [
    "-Dzsh-completions=true"
@@ -40,15 +55,31 @@ stdenv.mkDerivation (finalAttrs: {

  preFixup = ''
    gappsWrapperArgs+=(
      --prefix PATH : "${lib.makeBinPath [ systemd /* for busctl */ jq bash ]}"
      --prefix PATH : "${
        lib.makeBinPath [
          systemd # for busctl
          jq
          bash
        ]
      }"
    )
  '';

  postInstall = ''
    mkdir -p $out/lib/systemd/user
    substitute $src/contrib/systemd/mako.service $out/lib/systemd/user/mako.service \
      --replace-fail '/usr/bin' "$out/bin"
    chmod 0644 $out/lib/systemd/user/mako.service
  '';

  meta = {
    description = "Lightweight Wayland notification daemon";
    homepage = "https://wayland.emersion.fr/mako/";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dywedir synthetica ];
    maintainers = with lib.maintainers; [
      dywedir
      synthetica
    ];
    platforms = lib.platforms.linux;
    mainProgram = "mako";
  };