2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, fetchFromGitHub
|
|
|
|
, 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
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
installPhase = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
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 = ''
|
2023-08-04 22:07:22 +00:00
|
|
|
substituteInPlace systemd/mpd-notification.service --replace /usr $out
|
|
|
|
'';
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "Notifications for mpd";
|
|
|
|
homepage = "https://github.com/eworm-de/mpd-notification";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ CaitlinDavitt ];
|
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "mpd-notification";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|