Files
nixpkgs/pkgs/by-name/so/sonata/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

100 lines
2.2 KiB
Nix

{
lib,
fetchFromGitHub,
wrapGAppsHook3,
gettext,
python3Packages,
adwaita-icon-theme,
gtk3,
glib,
gdk-pixbuf,
gsettings-desktop-schemas,
gobject-introspection,
}:
let
inherit (python3Packages)
buildPythonApplication
isPy3k
dbus-python
pygobject3
mpd2
setuptools
;
in
buildPythonApplication rec {
pname = "sonata";
version = "1.7.1";
pyproject = true;
src = fetchFromGitHub {
owner = "multani";
repo = "sonata";
tag = "v${version}";
sha256 = "sha256-80F2dVaRawnI0E+GzaxRUudaLWWHGUjICCEbXHVGy+E=";
};
disabled = !isPy3k;
nativeBuildInputs = [
gettext
gobject-introspection
wrapGAppsHook3
];
buildInputs = [
glib
adwaita-icon-theme
gsettings-desktop-schemas
gtk3
gdk-pixbuf
];
build-system = [ setuptools ];
# The optional tagpy dependency (for editing metadata) is not yet
# included because it's difficult to build.
pythonPath = [
dbus-python
mpd2
pygobject3
setuptools # pkg_resources is imported during runtime
];
postPatch = ''
# Remove "Local MPD" tab which is not suitable for NixOS.
sed -i '/localmpd/d' sonata/consts.py
'';
meta = {
description = "Elegant client for the Music Player Daemon";
mainProgram = "sonata";
longDescription = ''
Sonata is an elegant client for the Music Player Daemon.
Written in Python and using the GTK 3 widget set, its features
include:
- Expanded and collapsed views
- Automatic remote and local album art
- Library browsing by folders, or by genre/artist/album
- User-configurable columns
- Automatic fetching of lyrics
- Playlist and stream support
- Support for editing song tags (not in NixOS version)
- Drag and drop to copy files
- Popup notification
- Library and playlist searching, filter as you type
- Audioscrobbler (last.fm) 1.2 support
- Multiple MPD profiles
- Keyboard friendly
- Support for multimedia keys
- Commandline control
- Available in 24 languages
'';
homepage = "https://www.nongnu.org/sonata/";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
};
}