2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, curl
|
|
|
|
, dbus
|
|
|
|
, libevent
|
|
|
|
, m4
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, scdoc
|
|
|
|
, json_c
|
2021-02-05 17:12:51 +00:00
|
|
|
, xdg-utils
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mpris-scrobbler";
|
|
|
|
version = "0.4.0.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mariusor";
|
|
|
|
repo = "mpris-scrobbler";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0jzmgcb9a19hl8y7iwy8l3cc2vgzi0scw7r5q72kszfyxn0yk2gs";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/signon.c \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
|
2021-01-09 10:05:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
m4
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
json_c
|
|
|
|
libevent
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Minimalistic scrobbler for libre.fm & last.fm";
|
|
|
|
homepage = "https://github.com/mariusor/mpris-scrobbler";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ emantor ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|