diff options
Diffstat (limited to 'nongnu')
| -rw-r--r-- | nongnu/packages/music.scm | 262 |
1 files changed, 147 insertions, 115 deletions
diff --git a/nongnu/packages/music.scm b/nongnu/packages/music.scm index 567beb2..952733e 100644 --- a/nongnu/packages/music.scm +++ b/nongnu/packages/music.scm | |||
| @@ -21,128 +21,160 @@ | |||
| 21 | #:use-module (ice-9 match) | 21 | #:use-module (ice-9 match) |
| 22 | #:use-module (ice-9 regex) | 22 | #:use-module (ice-9 regex) |
| 23 | #:use-module ((nonguix licenses) #:prefix license:) | 23 | #:use-module ((nonguix licenses) #:prefix license:) |
| 24 | #:use-module (nonguix utils) | ||
| 24 | #:use-module (nonguix build-system binary)) | 25 | #:use-module (nonguix build-system binary)) |
| 25 | 26 | ||
| 26 | (define-public reaper | 27 | (define %reaper-source-x86_64-linux |
| 28 | (package | ||
| 29 | (inherit %binary-source) | ||
| 30 | (version "7.77") | ||
| 31 | (source | ||
| 32 | (origin | ||
| 33 | (method url-fetch) | ||
| 34 | (uri (string-append | ||
| 35 | "https://www.reaper.fm/files/" (version-major version) ".x/reaper" | ||
| 36 | (string-replace-substring version "." "") "_linux_x86_64.tar.xz")) | ||
| 37 | (sha256 | ||
| 38 | (base32 "1w8dsrdca72c2cznww869f1j206d6743hjf3afp4p02lgr1rckf9")))))) | ||
| 39 | |||
| 40 | (define %reaper-source-i686-linux | ||
| 27 | (package | 41 | (package |
| 28 | (name "reaper") | 42 | (inherit %binary-source) |
| 29 | (version "7.77") | 43 | (version "7.77") |
| 30 | (source | 44 | (source |
| 31 | (origin | 45 | (origin |
| 32 | (method url-fetch) | 46 | (method url-fetch) |
| 33 | (uri (string-append "https://www.reaper.fm/files/" | 47 | (uri (string-append |
| 34 | (version-major version) | 48 | "https://www.reaper.fm/files/" (version-major version) ".x/reaper" |
| 35 | ".x/reaper" | 49 | (string-replace-substring version "." "") "_linux_i686.tar.xz")) |
| 36 | (string-replace-substring version "." "") | 50 | (sha256 |
| 37 | "_" | 51 | (base32 "0iz27k59plcz1rfgs2fdyyrd7l5g2hsk8m001vnnkysxgrmy6xz1")))))) |
| 38 | (match (%current-system) | 52 | |
| 39 | ("x86_64-linux" "linux_x86_64") | 53 | (define %reaper-source-aarch64-linux |
| 40 | ("i686-linux" "linux_i686") | 54 | (package |
| 41 | ("aarch64-linux" "linux_aarch64") | 55 | (inherit %binary-source) |
| 42 | ("armhf-linux" "linux_armv7l") | 56 | (version "7.77") |
| 43 | ;; We need a default case | 57 | (source |
| 44 | (_ "unsupported")) | 58 | (origin |
| 45 | ".tar.xz")) | 59 | (method url-fetch) |
| 46 | (sha256 | 60 | (uri (string-append |
| 47 | (base32 | 61 | "https://www.reaper.fm/files/" (version-major version) ".x/reaper" |
| 48 | (match (%current-system) | 62 | (string-replace-substring version "." "") "_linux_aarch64.tar.xz")) |
| 49 | ("x86_64-linux" | 63 | (sha256 |
| 50 | "1w8dsrdca72c2cznww869f1j206d6743hjf3afp4p02lgr1rckf9") | 64 | (base32 "1kfn9ybk8sfhrg4r9nqy06sawqx45gjc4f0b3arzbrpvl6qwywgz")))))) |
| 51 | ("i686-linux" | 65 | |
| 52 | "0iz27k59plcz1rfgs2fdyyrd7l5g2hsk8m001vnnkysxgrmy6xz1") | 66 | (define %reaper-source-armhf-linux |
| 53 | ("aarch64-linux" | 67 | (package |
| 54 | "1kfn9ybk8sfhrg4r9nqy06sawqx45gjc4f0b3arzbrpvl6qwywgz") | 68 | (inherit %binary-source) |
| 55 | ("armhf-linux" | 69 | (version "7.77") |
| 56 | "0wzciamkz2nqqsi7xrckfdwjczhf0faidn4fyqv6s2k6hqnyb80d") | 70 | (source |
| 57 | (_ "0000000000000000000000000000000000000000000000000000")))))) | 71 | (origin |
| 58 | (build-system binary-build-system) | 72 | (method url-fetch) |
| 59 | (arguments | 73 | (uri (string-append |
| 60 | (list #:strip-binaries? #f ;allocated section `.dynsym' not in segment | 74 | "https://www.reaper.fm/files/" (version-major version) ".x/reaper" |
| 61 | #:modules | 75 | (string-replace-substring version "." "") "_linux_armv7l.tar.xz")) |
| 62 | '((nonguix build binary-build-system) | 76 | (sha256 |
| 63 | (guix build utils) | 77 | (base32 "0wzciamkz2nqqsi7xrckfdwjczhf0faidn4fyqv6s2k6hqnyb80d")))))) |
| 64 | (nonguix build utils) | 78 | |
| 65 | (ice-9 match)) | 79 | (define-public reaper |
| 66 | #:patchelf-plan | 80 | (binary-package-from-sources |
| 67 | #~(map (lambda (file) | 81 | `(("x86_64-linux" . ,%reaper-source-x86_64-linux) |
| 68 | `(,file | 82 | ("i686-linux" . ,%reaper-source-i686-linux) |
| 69 | ,(append '("libc" "gcc") | 83 | ("aarch64-linux" . ,%reaper-source-aarch64-linux) |
| 70 | (match (basename file) | 84 | ("armhf-linux" . ,%reaper-source-armhf-linux)) |
| 71 | ("reaper" '("alsa-lib" "jack" "pulseaudio")) | 85 | (package |
| 72 | ((or "reaper_host_x86_64" | 86 | (name "reaper") |
| 73 | "reaper_host_i686" | 87 | (version #f) |
| 74 | "reaper_host_aarch64" | 88 | (source #f) |
| 75 | "reaper_host_armv7l") | 89 | (build-system binary-build-system) |
| 76 | '("alsa-lib")) | 90 | (arguments |
| 77 | ("reaper_video.so" '("mesa" "vlc")) | 91 | (list #:strip-binaries? #f ;allocated section `.dynsym' not in segment |
| 78 | ("reaper_mp3dec.so" '("lame")) | 92 | #:modules |
| 79 | (_ '()))))) | 93 | '((nonguix build binary-build-system) |
| 80 | `("REAPER/reaper" | 94 | (guix build utils) |
| 81 | ,#$(string-append "REAPER/Plugins/reaper_host_" | 95 | (nonguix build utils) |
| 82 | (match (%current-system) | 96 | (ice-9 match)) |
| 83 | ("x86_64-linux" "x86_64") | 97 | #:patchelf-plan |
| 84 | ("i686-linux" "i686") | 98 | #~(map (lambda (file) |
| 85 | ("aarch64-linux" "aarch64") | 99 | `(,file |
| 86 | ("armf-linux" "armv7l") | 100 | ,(append '("libc" "gcc") |
| 87 | (_ "unsupported"))) | 101 | (match (basename file) |
| 88 | ,@(find-files "REAPER/Plugins" "\\.so$"))) | 102 | ("reaper" '("alsa-lib" "jack" "pulseaudio")) |
| 89 | #:phases | 103 | ((or "reaper_host_x86_64" |
| 90 | #~(modify-phases %standard-phases | 104 | "reaper_host_i686" |
| 91 | (replace 'install | 105 | "reaper_host_aarch64" |
| 92 | (lambda _ | 106 | "reaper_host_armv7l") |
| 93 | (setenv "HOME" "/tmp") | 107 | '("alsa-lib")) |
| 94 | (setenv "XDG_DATA_HOME" (string-append #$output "/share")) | 108 | ("reaper_video.so" '("mesa" "vlc")) |
| 95 | (invoke "sh" "./install-reaper.sh" "--install" | 109 | ("reaper_mp3dec.so" '("lame")) |
| 96 | (string-append #$output "/opt") | 110 | (_ '()))))) |
| 97 | "--integrate-user-desktop") | 111 | `("REAPER/reaper" |
| 98 | (delete-file (string-append #$output "/opt/REAPER/" | 112 | ,#$(string-append "REAPER/Plugins/reaper_host_" |
| 99 | "uninstall-reaper.sh")))) | 113 | (match (%current-system) |
| 100 | (add-after 'install 'replace-swell | 114 | ("x86_64-linux" "x86_64") |
| 101 | (lambda* (#:key inputs #:allow-other-keys) | 115 | ("i686-linux" "i686") |
| 102 | (with-directory-excursion (string-append #$output | 116 | ("aarch64-linux" "aarch64") |
| 103 | "/opt/REAPER") | 117 | ("armf-linux" "armv7l") |
| 104 | (delete-file "libSwell.so") | 118 | (_ "unsupported"))) |
| 105 | (symlink (search-input-file inputs "/lib/libSwell.so") | 119 | ,@(find-files "REAPER/Plugins" "\\.so$"))) |
| 106 | "libSwell.so")))) | 120 | #:phases |
| 107 | (add-after 'replace-swell 'wrap-program | 121 | #~(modify-phases %standard-phases |
| 108 | (lambda _ | 122 | (replace 'install |
| 109 | (let ((wrapper (string-append #$output "/bin/reaper")) | 123 | (lambda _ |
| 110 | (bin (string-append #$output "/opt/REAPER/reaper"))) | 124 | (setenv "HOME" "/tmp") |
| 111 | (make-wrapper wrapper bin | 125 | (setenv "XDG_DATA_HOME" (string-append #$output "/share")) |
| 112 | `("PATH" ":" prefix | 126 | (invoke "sh" "./install-reaper.sh" "--install" |
| 113 | (,(string-append #$(this-package-input "ffmpeg") | 127 | (string-append #$output "/opt") |
| 114 | "/bin"))))))) | 128 | "--integrate-user-desktop") |
| 115 | (add-after 'wrap-program 'fix-desktop-entry | 129 | (delete-file (string-append #$output "/opt/REAPER/" |
| 116 | (lambda _ | 130 | "uninstall-reaper.sh")))) |
| 117 | (substitute* (string-append #$output | 131 | (add-after 'install 'replace-swell |
| 118 | "/share/applications/" | 132 | (lambda* (#:key inputs #:allow-other-keys) |
| 119 | "cockos-reaper.desktop") | 133 | (with-directory-excursion (string-append #$output |
| 120 | (("opt/REAPER") "bin")))) | 134 | "/opt/REAPER") |
| 121 | (replace 'install-license-files | 135 | (delete-file "libSwell.so") |
| 122 | (lambda _ | 136 | (symlink (search-input-file inputs "/lib/libSwell.so") |
| 123 | (install-file "REAPER/EULA.txt" | 137 | "libSwell.so")))) |
| 124 | (string-append #$output "/share/doc/reaper-" | 138 | (add-after 'replace-swell 'wrap-program |
| 125 | #$version))))))) | 139 | (lambda _ |
| 126 | (native-inputs | 140 | (let ((wrapper (string-append #$output "/bin/reaper")) |
| 141 | (bin (string-append #$output "/opt/REAPER/reaper"))) | ||
| 142 | (make-wrapper wrapper bin | ||
| 143 | `("PATH" ":" prefix | ||
| 144 | (,(string-append #$(this-package-input "ffmpeg") | ||
| 145 | "/bin"))))))) | ||
| 146 | (add-after 'wrap-program 'fix-desktop-entry | ||
| 147 | (lambda _ | ||
| 148 | (substitute* (string-append #$output | ||
| 149 | "/share/applications/" | ||
| 150 | "cockos-reaper.desktop") | ||
| 151 | (("opt/REAPER") "bin")))) | ||
| 152 | (replace 'install-license-files | ||
| 153 | (lambda _ | ||
| 154 | (install-file | ||
| 155 | "REAPER/EULA.txt" | ||
| 156 | (string-append #$output "/share/doc/reaper-" | ||
| 157 | #$(package-version this-package)))))))) | ||
| 158 | (native-inputs | ||
| 127 | (list xdg-utils)) | 159 | (list xdg-utils)) |
| 128 | (inputs | 160 | (inputs |
| 129 | (list alsa-lib | 161 | (list alsa-lib |
| 130 | `(,gcc "lib") | 162 | `(,gcc "lib") |
| 131 | ffmpeg | 163 | ffmpeg |
| 132 | jack-1 | 164 | jack-1 |
| 133 | lame | 165 | lame |
| 134 | mesa | 166 | mesa |
| 135 | pulseaudio | 167 | pulseaudio |
| 136 | python | 168 | python |
| 137 | swell | 169 | swell |
| 138 | vlc)) | 170 | vlc)) |
| 139 | (supported-systems | 171 | (supported-systems |
| 140 | '("x86_64-linux" "i686-linux" "aarch64-linux" "armhf-linux")) | 172 | '("x86_64-linux" "i686-linux" "aarch64-linux" "armhf-linux")) |
| 141 | (home-page "https://www.reaper.fm") | 173 | (home-page "https://www.reaper.fm") |
| 142 | (synopsis "Digital audio workstation") | 174 | (synopsis "Digital audio workstation") |
| 143 | (description | 175 | (description |
| 144 | "REAPER is a digital audio production application offering multitrack | 176 | "REAPER is a digital audio production application offering multitrack |
| 145 | audio and MIDI recording, editing, processing, mixing and mastering toolset. | 177 | audio and MIDI recording, editing, processing, mixing and mastering toolset. |
| 146 | It supports a vast range of hardware, digital formats and plugins, and can be | 178 | It supports a vast range of hardware, digital formats and plugins, and can be |
| 147 | comprehensively extended, scripted and modified.") | 179 | comprehensively extended, scripted and modified.") |
| 148 | (license (license:nonfree "file:///opt/REAPER/EULA.txt")))) | 180 | (license (license:nonfree "file:///opt/REAPER/EULA.txt"))))) |
