nixpkgs/pkgs/tools/audio/mpd-discord-rpc/default.nix

40 lines
986 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "mpd-discord-rpc";
version = "1.7.1";
src = fetchFromGitHub {
owner = "JakeStanger";
repo = "mpd-discord-rpc";
rev = "v${version}";
hash = "sha256-fJHBQGc0+HjEALWuAWSts1l6NMookkut3Cm4e541iGw=";
};
cargoHash = "sha256-v5JN0Nqp/fGjjJaKrMWt2HWzxAnA1URf0P2Xq9lHNVQ=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
meta = with lib; {
description = "Rust application which displays your currently playing song / album / artist from MPD in Discord using Rich Presence";
homepage = "https://github.com/JakeStanger/mpd-discord-rpc/";
changelog = "https://github.com/JakeStanger/mpd-discord-rpc/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ kranzes ];
};
}