[bug#75720,v6,5/5] gnu: Add amarok.

Message ID 20250725173502.14568-5-sughosha@disroot.org
State New
Headers
Series [bug#75720,v6,1/5] gnu: libmygpo-qt: Update to 1.2.0. |

Commit Message

Sughosha July 25, 2025, 5:35 p.m. UTC
* gnu/packages/kde-multimedia.scm (amarok): New variable.

Change-Id: I5e13887f744c693e06536eb0c683a4fd473212c6
---
 gnu/packages/kde-multimedia.scm | 115 ++++++++++++++++++++++++++++++++
 1 file changed, 115 insertions(+)
  

Patch

diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm
index 600a868238..d23c6fa1fd 100644
--- a/gnu/packages/kde-multimedia.scm
+++ b/gnu/packages/kde-multimedia.scm
@@ -32,14 +32,19 @@  (define-module (gnu packages kde-multimedia)
   #:use-module (guix utils)
   #:use-module (guix gexp)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cdrom)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages crypto)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gpodder)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gstreamer)
@@ -47,6 +52,7 @@  (define-module (gnu packages kde-multimedia)
   #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages kde-plasma)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages music)
@@ -55,6 +61,7 @@  (define-module (gnu packages kde-multimedia)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xiph)
@@ -101,6 +108,114 @@  (define-public audiocd-kio
     (license ;; GPL for programs, FDL for documentation
      (list license:gpl2+ license:fdl1.2+))))
 
+(define-public amarok
+  (package
+    (name "amarok")
+    (version "3.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://kde/stable/amarok/" version
+                                  "/amarok-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1b7i9zqkrr6izj07453h8m1zqx5r9sb7d46qlh795gql7ixmikid"))))
+    (build-system qt-build-system)
+    (arguments
+     (list #:qtbase qtbase
+           #:configure-flags
+           #~(list "-DBUILD_WITH_QT6=ON")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'check-setup
+                 (lambda _
+                   ;; Set home directory.
+                   (setenv "HOME" "/tmp")
+                   ;; testplaylistlayout looks for "amarok/data" directory in
+                   ;; $XDG_DATA_DIRS. Maybe it is for testing after installing.
+                   ;; As a workaround, set XDG_DATA_DIRS pointing to $TMPDIR
+                   ;; which contains "amarok/data" directory.
+                   (let ((linktarget (string-append (dirname (getcwd))
+                                                    "/amarok")))
+                     (if (not (equal? (basename (getcwd)) "amarok"))
+                       (symlink (getcwd) linktarget))
+                     (setenv "XDG_DATA_DIRS"
+                             (string-append (getenv "XDG_DATA_DIRS") ":"
+                                            (dirname linktarget))))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     ;; testsqlscanmanager fails, even when run manually.
+                     (invoke "ctest" "-E" "testsqlscanmanager")))))))
+    (native-inputs
+       (list extra-cmake-modules
+              googletest kdoctools
+              `(,mariadb "dev")
+              pkg-config
+              qttools))
+    (inputs
+     ;; TODO: Add packages containing "gstreamer-cdda-1.0" and
+     ;; "gstreamer-netbuffer-1.0" modules.
+     (list ffmpeg
+           fftw
+           glib
+           gstreamer
+           gst-plugins-bad
+           gst-plugins-base
+           gst-plugins-good
+           gst-plugins-ugly
+           gst-libav
+           karchive
+           kcodecs
+           kcolorscheme
+           kconfig
+           kconfigwidgets
+           kcoreaddons
+           kcmutils
+           kcrash
+           kdbusaddons
+           kdnssd
+           kglobalaccel
+           kguiaddons
+           ki18n
+           kiconthemes
+           kio
+           kirigami
+           knotifications
+           kpackage
+           kstatusnotifieritem
+           ktexteditor
+           ktextwidgets
+           kwallet
+           kwidgetsaddons
+           kwindowsystem
+           libofa
+           libmtp
+           libmygpo-qt
+           libxcrypt
+           `(,mariadb "lib")
+           openssl
+           python
+           qt5compat
+           qtsvg
+           qtwebengine
+           solid
+           taglib
+           threadweaver))
+    (home-page "https://amarok.kde.org/")
+    (synopsis "Audio player for KDE")
+    (description
+     "Amarok is a music player and collection manager.  It features:
+@itemize
+@item dynamic playlists matching different criteria,
+@item collection managing with rating support,
+@item support for basic MTP and UMS music player devices,
+@item integrated internet services such as Magnatune, Ampache and more,
+@item scripting support,
+@item cover manager and
+@item replay gain support
+@end itemize")
+    (license license:gpl2+)))
+
 (define-public dragon
   (package
     (name "dragon")