From 5d714dddd43fc9c34bf482c57aee8327afcd6dbe Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sun, 7 Dec 2025 12:01:50 -0500 Subject: [PATCH] gnu: Add projectm-sdl. * gnu/packages/audio.scm (projectm-sdl): New variable. Change-Id: I2bac86e6c08fdef858f7a1c5450f979b6af54738 Signed-off-by: Gabriel Wicki Signed-off-by: Rutherther --- gnu/packages/audio.scm | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index f3cdb0fa1b4eb299c175944f569327f33720d4bc..80ac90df951d92bd9399eda928906e808ef410a8 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -155,6 +155,7 @@ #:use-module (gnu packages telephony) #:use-module (gnu packages tex) #:use-module (gnu packages tls) + #:use-module (gnu packages toolkits) #:use-module (gnu packages valgrind) #:use-module (gnu packages version-control) #:use-module (gnu packages video) @@ -4399,6 +4400,55 @@ visualizer. This package contains only the libprojectm library.") meant to be included in any projectM-based application.") (license license:public-domain)))) +(define-public projectm-sdl + (let ((source-commit "72e5632897c9d9bef452c679d3cbe8c7b4bb4157") + (revision "0")) + (package + (name "projectm-sdl") + (version (git-version "0" revision source-commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/projectM-visualizer/frontend-sdl-cpp") + (commit source-commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14vsjn589lrcwkz0d4528i33aslqsgh7m17kxj0fyd21pwj5n54l")) + (modules '((guix build utils))) + ;;There are no icon files to install. + (snippet #~(substitute* "install.cmake" (("install_icon.+") ""))))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f ;There are no tests. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'link-imgui + (lambda* (#:key inputs #:allow-other-keys) + (begin (delete-file-recursively "vendor/imgui") + (symlink (assoc-ref %build-inputs "imgui-source") + "vendor/imgui"))))) + #:configure-flags + #~(list + ;; There are texture repositories from both ProjectM and + ;; Milkdrop, but their licensing is unclear, so they are not + ;; packaged. ProjectM functions fine with only presets. + (string-append "-DDEFAULT_PRESETS_PATH=" + (assoc-ref %build-inputs "projectm-presets")) + ;; The config location search path can be changed, but the + ;; install path stays the same, so only this value works. + ;; And without it, only the binary's path is checked. + (string-append "-DDEFAULT_CONFIG_PATH=" + #$output "/share/projectMSDL/")))) + (inputs (list freetype poco projectm projectm-presets sdl2)) + (native-inputs (list `("imgui-source" ,(package-source imgui)))) + (home-page "https://github.com/projectM-visualizer/frontend-sdl-cpp") + (synopsis "Reference frontend for the libprojectm music visualizer") + (description "This is a simple Milkdrop-like music visualizer that uses +the projectM library to visualize audio input.") + (license license:gpl3+)))) ;presets + (define-public qjackctl (package (name "qjackctl")