mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-10-02 02:14:59 +00:00
310 lines
14 KiB
Scheme
310 lines
14 KiB
Scheme
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
|
;;; Copyright © 2022-2025 Sughosha <sughosha@proton.me>
|
|
;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
|
|
|
(define-module (nongnu packages music)
|
|
#:use-module (gnu packages audio)
|
|
#:use-module (gnu packages base)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages cpp)
|
|
#:use-module (gnu packages fcitx5)
|
|
#:use-module (gnu packages fontutils)
|
|
#:use-module (gnu packages freedesktop)
|
|
#:use-module (gnu packages gcc)
|
|
#:use-module (gnu packages ghostscript)
|
|
#:use-module (gnu packages gl)
|
|
#:use-module (gnu packages glib)
|
|
#:use-module (gnu packages gtk)
|
|
#:use-module (gnu packages image)
|
|
#:use-module (gnu packages libusb)
|
|
#:use-module (gnu packages linux)
|
|
#:use-module (gnu packages llvm)
|
|
#:use-module (gnu packages pulseaudio)
|
|
#:use-module (gnu packages video)
|
|
#:use-module (gnu packages vulkan)
|
|
#:use-module (gnu packages xdisorg)
|
|
#:use-module (gnu packages xorg)
|
|
#:use-module (guix download)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix utils)
|
|
#:use-module (ice-9 match)
|
|
#:use-module (ice-9 regex)
|
|
#:use-module ((nonguix licenses) #:prefix license:)
|
|
#:use-module (nonguix build-system binary))
|
|
|
|
(define-public bitwig-studio
|
|
(package
|
|
(name "bitwig-studio")
|
|
(version "5.3.13")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://www.bitwig.com/dl/Bitwig%20Studio/" version
|
|
"/installer_linux"))
|
|
(sha256
|
|
(base32 "0yh2ii19qiakswjz9vjlxcdqrq34g576n2xwl74816yksz7q67xp"))
|
|
(file-name (string-append "bitwig-studio-" version ".deb"))))
|
|
(build-system binary-build-system)
|
|
(arguments
|
|
(list #:install-plan
|
|
#~`(("opt" "opt"
|
|
#:exclude ("BitwigPluginHost-X86-SSE41")) ;no multilib support
|
|
("usr/share" "share"))
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(add-after 'binary-unpack 'unbundle-deps
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(with-directory-excursion "opt/bitwig-studio"
|
|
;; FIXME: Package "lwjgl3" and unbundle "bin/liblwjgl.so".
|
|
;; FIXME: Unbundle "jre" if an "openjdk" package of the
|
|
;; same version is available.
|
|
(for-each delete-file
|
|
'("bin/ffmpeg"
|
|
"bin/ffprobe"
|
|
"bin/libLTO.so"
|
|
"lib/bitwig-studio/libxcb-imdkit.so.1"
|
|
"lib/cp/org/usb4java/linux-x86-64/libusb4java.so"))
|
|
;; Link "libusb4java.so" from the system.
|
|
(symlink (search-input-file inputs "/lib/libusb4java.so")
|
|
(string-append "lib/cp/org/usb4java/"
|
|
"linux-x86-64/libusb4java.so")))))
|
|
(replace 'patchelf
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(with-directory-excursion "opt/bitwig-studio"
|
|
(invoke "patchelf" "--set-interpreter"
|
|
(string-append (assoc-ref inputs "libc")
|
|
"/lib/ld-linux-x86-64.so.2")
|
|
"bitwig-studio"
|
|
"BitwigStudio"
|
|
"bin/BitwigAudioEngine-X64-AVX2"
|
|
"bin/BitwigAudioEngine-X64-SSE41"
|
|
"bin/BitwigPluginHost-X64-SSE41"
|
|
"bin/BitwigVampHost"
|
|
"bin/show-file-dialog-gtk3"
|
|
"bin/show-splash-gtk"
|
|
"lib/jre/bin/java"
|
|
"lib/jre/bin/jrunscript"
|
|
"lib/jre/bin/jwebserver"
|
|
"lib/jre/bin/keytool"
|
|
"lib/jre/lib/jexec"
|
|
"lib/jre/lib/jspawnhelper"))))
|
|
(add-after 'install 'create-wrapper
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(let ((libs
|
|
(string-join (map (lambda (input)
|
|
(string-append (assoc-ref inputs
|
|
input)
|
|
"/lib"))
|
|
'("alsa-lib"
|
|
"at-spi2-core"
|
|
"cairo"
|
|
"dbus"
|
|
"eudev"
|
|
"ffmpeg"
|
|
"fontconfig-minimal"
|
|
"freetype"
|
|
"gcc"
|
|
"gdk-pixbuf"
|
|
"giflib"
|
|
"glib"
|
|
"gtk+"
|
|
"harfbuzz"
|
|
"jack2"
|
|
"lcms"
|
|
"libglvnd"
|
|
"libjpeg-turbo"
|
|
"libpng"
|
|
"libusb4java"
|
|
"libx11"
|
|
"libxcb"
|
|
"libxcursor"
|
|
"libxext"
|
|
"libxi"
|
|
"libxkbcommon"
|
|
"libxrender"
|
|
"libxtst"
|
|
"llvm"
|
|
"mesa"
|
|
"pango"
|
|
"pipewire"
|
|
"pulseaudio"
|
|
"vulkan-loader"
|
|
"xcb-imdkit"
|
|
"xcb-util"
|
|
"xcb-util-wm"
|
|
"zlib"))
|
|
":")))
|
|
(with-directory-excursion
|
|
(string-append #$output "/opt/bitwig-studio")
|
|
(for-each
|
|
(lambda (file)
|
|
(wrap-program file
|
|
`("LD_LIBRARY_PATH" ":" suffix (,libs))))
|
|
'("bitwig-studio"
|
|
"BitwigStudio"
|
|
"bin/BitwigAudioEngine-X64-AVX2"
|
|
"bin/BitwigAudioEngine-X64-SSE41"
|
|
"bin/BitwigPluginHost-X64-SSE41"
|
|
"bin/BitwigVampHost"
|
|
"bin/show-file-dialog-gtk3"
|
|
"bin/show-splash-gtk"
|
|
"lib/jre/bin/java"
|
|
"lib/jre/bin/jrunscript"
|
|
"lib/jre/bin/jwebserver"
|
|
"lib/jre/bin/keytool"
|
|
"lib/jre/lib/jexec"
|
|
"lib/jre/lib/jspawnhelper")))
|
|
(make-wrapper
|
|
(string-append #$output "/bin/bitwig-studio")
|
|
(string-append #$output
|
|
"/opt/bitwig-studio/bitwig-studio")
|
|
#:skip-argument-0? #t
|
|
`("PATH" suffix
|
|
(,(string-append (assoc-ref inputs "ffmpeg") "/bin")))
|
|
`("LD_LIBRARY_PATH" ":" suffix (,libs))))))
|
|
(replace 'install-license-files
|
|
(lambda _
|
|
(install-file
|
|
(string-append "opt/bitwig-studio/EULA.txt")
|
|
(string-append #$output "/share/doc/"
|
|
(strip-store-file-name #$output))))))))
|
|
(native-inputs
|
|
(list zstd))
|
|
(propagated-inputs
|
|
(list at-spi2-core gtk+))
|
|
(inputs
|
|
(list alsa-lib
|
|
cairo
|
|
dbus
|
|
eudev
|
|
ffmpeg
|
|
fontconfig
|
|
freetype
|
|
`(,gcc "lib")
|
|
gdk-pixbuf
|
|
giflib
|
|
glib
|
|
harfbuzz
|
|
jack-2
|
|
lcms
|
|
libglvnd
|
|
libjpeg-turbo
|
|
libpng
|
|
libusb4java
|
|
libx11
|
|
libxcb
|
|
libxcursor
|
|
libxext
|
|
libxi
|
|
libxkbcommon
|
|
libxrender
|
|
libxtst
|
|
llvm-19
|
|
mesa
|
|
pango
|
|
pipewire
|
|
pulseaudio
|
|
vulkan-loader
|
|
xcb-imdkit
|
|
xcb-util
|
|
xcb-util-wm
|
|
zlib))
|
|
(supported-systems
|
|
(list "x86_64-linux"))
|
|
(home-page "https://www.bitwig.com/")
|
|
(synopsis "Music production and performance software")
|
|
(description
|
|
"Bitwig Studio is a digital audio workstation which is aimed at loop based
|
|
live performance and production. It features modulations, macros, note
|
|
expressions, LFOs and envelopes. It also supports VST plugins and hardware
|
|
integration.")
|
|
(license (license:nonfree "file:///opt/bitwig-studio/EULA.txt"))))
|
|
|
|
(define-public reaper
|
|
(package
|
|
(name "reaper")
|
|
(version "6.73")
|
|
(source
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://www.reaper.fm/files/"
|
|
(version-major version)
|
|
".x/reaper"
|
|
(string-replace-substring version "." "")
|
|
"_"
|
|
(match (%current-system)
|
|
("x86_64-linux" "linux_x86_64")
|
|
("i686-linux" "linux_i686")
|
|
("aarch64-linux" "linux_aarch64")
|
|
("armhf-linux" "linux_armv7l")
|
|
;; We need a default case
|
|
(_ "unsupported"))
|
|
".tar.xz"))
|
|
(sha256
|
|
(base32
|
|
(match (%current-system)
|
|
("x86_64-linux" "1hd7fbk0px45fxhqa7nqcnij8ls2fhpjp60v840vy2zqs9fkcr52")
|
|
("i686-linux" "11vk32mxyda9xl08pp2ivd1vsahnw6w7d08in4syz6iannfwp19b")
|
|
("aarch64-linux" "0zpkaiwwxn8yh3s1d22qswshbgaxx5d8iy17hb3w256zgb722yjw")
|
|
("armhf-linux" "18174b1lgsk73gxhala471ppzbrpa1cs953b5par998yqgh74znk")
|
|
;; We need a valid base32 default case
|
|
(_ "0000000000000000000000000000000000000000000000000000"))))))
|
|
(build-system binary-build-system)
|
|
(arguments
|
|
(list #:strip-binaries? #f ;allocated section `.dynsym' not in segment
|
|
#:patchelf-plan #~`(("REAPER/reaper" ("libc" "gcc" "alsa-lib"))
|
|
("REAPER/reamote-server" ("libc" "gcc"))
|
|
("REAPER/Plugins/reaper_host_x86_64" ("libc" "gcc")))
|
|
#:phases #~(modify-phases %standard-phases
|
|
(replace 'install
|
|
(lambda* (#:key outputs inputs #:allow-other-keys)
|
|
(let* ((target (string-append #$output "/opt"))
|
|
(bin (string-append #$output "/bin"))
|
|
(libexec (string-append #$output "/libexec"))
|
|
(data (string-append #$output "/share"))
|
|
(doc (string-append data "/doc/reaper-"
|
|
#$version)))
|
|
(setenv "HOME" "/tmp")
|
|
(setenv "XDG_DATA_HOME" data)
|
|
(invoke "sh" "./install-reaper.sh" "--install"
|
|
target "--integrate-user-desktop")
|
|
(delete-file (string-append target
|
|
"/REAPER/uninstall-reaper.sh"))
|
|
(delete-file (string-append target
|
|
"/REAPER/libSwell.so"))
|
|
(symlink (search-input-file inputs
|
|
"/lib/libSwell.so")
|
|
(string-append target
|
|
"/REAPER/libSwell.so"))
|
|
(mkdir-p bin)
|
|
(symlink (string-append target "/REAPER/reaper")
|
|
(string-append bin "/reaper"))
|
|
(mkdir-p libexec)
|
|
(symlink (string-append target
|
|
"/REAPER/Plugins/reaper_host_x86_64")
|
|
(string-append libexec
|
|
"/reaper_host_x86_64"))
|
|
(mkdir-p doc)
|
|
(symlink (string-append target
|
|
"/REAPER/EULA.txt")
|
|
(string-append doc "/LICENSE"))))))))
|
|
(native-inputs
|
|
(list
|
|
which
|
|
xdg-utils))
|
|
(inputs
|
|
(list
|
|
alsa-lib
|
|
`(,gcc "lib")
|
|
wdl))
|
|
(supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux"
|
|
"armhf-linux"))
|
|
(home-page "https://www.reaper.fm")
|
|
(synopsis "Digital audio workstation")
|
|
(description
|
|
"REAPER is a digital audio production application offering multitrack
|
|
audio and MIDI recording, editing, processing, mixing and mastering toolset.
|
|
It supports a vast range of hardware, digital formats and plugins, and can be
|
|
comprehensively extended, scripted and modified.")
|
|
(license (license:nonfree "file:///opt/REAPER/EULA.txt"))))
|