From 1009283759dafbc9d47ea226f80caa6602217206 Mon Sep 17 00:00:00 2001 From: caitlin Date: Wed, 21 Jun 2023 23:32:02 -0500 Subject: [PATCH] mpd-notification: init at 0.8.7 mpd-notification mpd-notification: init at 0.8.7 --- pkgs/tools/audio/mpd-notification/default.nix | 61 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/tools/audio/mpd-notification/default.nix diff --git a/pkgs/tools/audio/mpd-notification/default.nix b/pkgs/tools/audio/mpd-notification/default.nix new file mode 100644 index 000000000000..66f6d1880a61 --- /dev/null +++ b/pkgs/tools/audio/mpd-notification/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, pkg-config +, fetchFromGitHub +, systemd +, file +, iniparser +, ffmpeg +, libnotify +, libmpdclient +, discount +}: + +stdenv.mkDerivation rec { + pname = "mpd-notification"; + version = "0.8.7"; + + src = fetchFromGitHub { + owner = "eworm-de"; + repo = "mpd-notification"; + rev = version; + hash = "sha256-lBvx2eYxFJUAxR1LrjWHZUeAo+WnQKmPYJVAJTeXqHY="; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + iniparser + libnotify + file + ffmpeg + libmpdclient + discount + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + mv mpd-notification $out/bin + + mkdir -p $out/lib/systemd/user + cp systemd/mpd-notification.service $out/lib/systemd/user + + runHook postInstall + ''; + + postPatch = '' + substituteInPlace systemd/mpd-notification.service --replace /usr $out + ''; + + meta = with lib; { + description = "Notifications for mpd"; + homepage = "https://github.com/eworm-de/mpd-notification"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ CaitlinDavitt ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1475bea3971e..349a780cbf79 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5631,6 +5631,8 @@ with pkgs; mpd-mpris = callPackage ../tools/audio/mpd-mpris { }; + mpd-notification = callPackage ../tools/audio/mpd-notification { }; + mpd-sima = python3Packages.callPackage ../tools/audio/mpd-sima { }; mpris-scrobbler = callPackage ../tools/audio/mpris-scrobbler { };