gnu: carla: Make carla executable.

This commit allows lmms to launch carla.

* gnu/packages/audio.scm (carla)[arguments]<#:phases>: In make-carla-executable
phase, also make carla-control, carla-jack-multi, carla-jack-single,
carla-patchbay and carla-rack executable. In wrap-executables phase, also wrap
the other executables.

Change-Id: I42dee1070d467ca0aa292a4b5a412bece6c1a489
This commit is contained in:
Sughosha 2024-12-05 21:43:08 +05:30 committed by Gabriel Wicki
parent 80065cbaa9
commit 2c47027d02
No known key found for this signature in database
GPG key ID: CC98E9F04330FD7F

View file

@ -6533,12 +6533,30 @@ as is the case with audio plugins.")
(invoke "make" "features")))
(add-after 'install 'make-carla-executable
(lambda _
(chmod (string-append #$output "/share/carla/carla") #o555)))
(with-directory-excursion (string-append #$output
"/share/carla")
(for-each (lambda (file)
(chmod file #o555))
(list "carla"
"carla-control"
"carla-jack-multi"
"carla-jack-single"
"carla-patchbay"
"carla-rack")))))
(add-after 'install 'wrap-executables
(lambda _
(wrap-program (string-append #$output "/bin/carla")
(lambda* (#:key inputs #:allow-other-keys)
;; Wrap only those executable files that other programs
;; (e.g. lmms) would call.
(with-directory-excursion #$output
(for-each (lambda (file)
(when (and (executable-file? file)
(not (symbolic-link? file))
(not (string-suffix? ".py" file)))
(wrap-program file
`("GUIX_PYTHONPATH" ":" prefix
(,(getenv "GUIX_PYTHONPATH")))))))))
(,(getenv "GUIX_PYTHONPATH"))))))
(append (find-files "share/carla/resources")
(find-files "bin")))))))))
(inputs
(list alsa-lib
ffmpeg