gnu: imgui: Use gexp output variables.
* gnu/packages/toolkits.scm (imgui) [arguments]: Use gexp variables in install phase.master
parent
216312482f
commit
b8b7622d2b
|
@ -89,32 +89,33 @@
|
||||||
;; fontconfig.
|
;; fontconfig.
|
||||||
(find-files "misc" "\\.cpp$"))))
|
(find-files "misc" "\\.cpp$"))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((header? (cut string-suffix? ".h" <>))
|
||||||
(doc (assoc-ref outputs "doc"))
|
|
||||||
(header? (cut string-suffix? ".h" <>))
|
|
||||||
(imgui-headers (scandir "." header?))
|
(imgui-headers (scandir "." header?))
|
||||||
(backend-headers (find-files
|
(backend-headers (find-files
|
||||||
"backends"
|
"backends"
|
||||||
"(glfw|opengl|sdl|vulkan).*\\.h$"))
|
"(glfw|opengl|sdl|vulkan).*\\.h$"))
|
||||||
(misc-headers (find-files "misc" "\\.h$")))
|
(misc-headers (find-files "misc" "\\.h$")))
|
||||||
(install-file "libimgui.so" (string-append out "/lib"))
|
(install-file "libimgui.so" (string-append #$output "/lib"))
|
||||||
;; Install headers.
|
;; Install headers.
|
||||||
(for-each (lambda (f)
|
(for-each (lambda (f)
|
||||||
(install-file f (string-append out "/include/imgui")))
|
(install-file f (string-append #$output
|
||||||
|
"/include/imgui")))
|
||||||
imgui-headers)
|
imgui-headers)
|
||||||
(for-each (lambda (f)
|
(for-each (lambda (f)
|
||||||
(install-file f (string-append
|
(install-file f (string-append
|
||||||
out "/include/imgui/backends")))
|
#$output
|
||||||
|
"/include/imgui/backends")))
|
||||||
backend-headers)
|
backend-headers)
|
||||||
(for-each (lambda (f)
|
(for-each (lambda (f)
|
||||||
(install-file f (string-append
|
(install-file f (string-append #$output
|
||||||
out "/include/imgui/" (dirname f))))
|
"/include/imgui/"
|
||||||
|
(dirname f))))
|
||||||
misc-headers)
|
misc-headers)
|
||||||
;; Install examples.
|
;; Install examples.
|
||||||
(copy-recursively
|
(copy-recursively "examples"
|
||||||
"examples" (string-append
|
(string-append #$output:doc
|
||||||
doc "/share/imgui/examples"))))))))
|
"/share/imgui/examples"))))))))
|
||||||
(inputs (list fontconfig glfw mesa sdl2))
|
(inputs (list fontconfig glfw mesa sdl2))
|
||||||
(home-page "https://github.com/ocornut/imgui")
|
(home-page "https://github.com/ocornut/imgui")
|
||||||
(synopsis "Immediate-mode C++ GUI library with minimal dependencies")
|
(synopsis "Immediate-mode C++ GUI library with minimal dependencies")
|
||||||
|
|
Reference in New Issue