depot/third_party/nixpkgs/pkgs/tools/audio/mpris-scrobbler/default.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

61 lines
1.1 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, nix-update-script
, curl
, dbus
, libevent
, m4
, meson
, ninja
, pkg-config
, scdoc
, json_c
, xdg-utils
}:
stdenv.mkDerivation rec {
pname = "mpris-scrobbler";
version = "0.4.90";
src = fetchFromGitHub {
owner = "mariusor";
repo = "mpris-scrobbler";
rev = "v${version}";
sha256 = "sha256-+Y5d7yFOnSk2gQS/m/01ofbNeDCLXb+cTTlHj4bgO0M=";
};
postPatch = ''
substituteInPlace src/signon.c \
--replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
'';
nativeBuildInputs = [
m4
meson
ninja
pkg-config
scdoc
];
buildInputs = [
curl
dbus
json_c
libevent
];
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
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;
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/mpris-scrobbler.x86_64-darwin
};
}