gnu: luakit: Improve package style.

* gnu/packages/web-browsers.scm (luakit)[arguments]<#:tests?>: Properly
disable tests instead of deleting CHECK phase.
<#:make-flags, #:phases>: Use G-expressions.  Remove trailing #T.
<#:test-targes>: Add it, for the record.
[inputs]: Remove labels.
This commit is contained in:
Nicolas Goaziou 2023-04-21 11:18:56 +02:00
parent 1027f10199
commit d3bc56da04
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -217,61 +217,53 @@ (define-public luakit
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/luakit/luakit")
(commit version)))
(url "https://github.com/luakit/luakit")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"19z6idmjz6y7xmjpqgw65mdfi65lyvy06819dj5bb7rad63v5542"))))
(inputs
`(("lua-5.1" ,lua-5.1)
("gtk+" ,gtk+)
("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
("glib-networking" ,glib-networking)
("lua5.1-filesystem" ,lua5.1-filesystem)
("luajit" ,luajit)
("webkitgtk" ,webkitgtk-with-libsoup2)
("sqlite" ,sqlite)))
(native-inputs
(list pkg-config))
(build-system glib-or-gtk-build-system)
(arguments
`(#:make-flags
(let ((out (assoc-ref %outputs "out")))
(list
"CC=gcc"
"LUA_BIN_NAME=lua"
"DEVELOPMENT_PATHS=0"
(string-append "PREFIX=" out)
(string-append "XDGPREFIX=" out "/etc/xdg")))
#:phases
(modify-phases %standard-phases
(add-before 'build 'lfs-workaround
(lambda _
(setenv "LUA_CPATH"
(string-append
(assoc-ref %build-inputs "lua5.1-filesystem")
"/lib/lua/5.1/?.so;;"))
#t))
(add-before 'build 'set-version
(lambda _
(setenv "VERSION_FROM_GIT" ,(package-version this-package))
#t))
(delete 'configure)
(delete 'check)
(add-after 'install 'wrap
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((luakit (assoc-ref outputs "out"))
(lua5.1-filesystem (assoc-ref inputs "lua5.1-filesystem") )
(gtk (assoc-ref inputs "gtk+"))
(gtk-share (string-append gtk "/share")))
(wrap-program (string-append luakit "/bin/luakit")
`("LUA_CPATH" prefix
(,(string-append lua5.1-filesystem
"/lib/lua/5.1/?.so;;")))
`("XDG_CONFIG_DIRS" prefix
(,(string-append luakit "/etc/xdg/"))))
#t))))))
(list
#:tests? #false ;require un-packaged "luassert"
#:test-target "run-tests"
#:make-flags
#~(list (string-append "CC=" #$(cc-for-target))
"LUA_BIN_NAME=lua"
"DEVELOPMENT_PATHS=0"
(string-append "PREFIX=" #$output)
(string-append "XDGPREFIX=" #$output "/etc/xdg"))
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'lfs-workaround
(lambda _
(setenv "LUA_CPATH"
(string-append #$(this-package-input "lua5.1-filesystem")
"/lib/lua/5.1/?.so;;"))))
(add-before 'build 'set-version
(lambda _
(setenv "VERSION_FROM_GIT" #$version)))
(delete 'configure)
(add-after 'install 'wrap
(lambda* (#:key inputs #:allow-other-keys)
(wrap-program (string-append #$output "/bin/luakit")
`("LUA_CPATH" prefix
(,(string-append #$(this-package-input "lua5.1-filesystem")
"/lib/lua/5.1/?.so;;")))
`("XDG_CONFIG_DIRS" prefix
(,(string-append #$output "/etc/xdg/")))))))))
(native-inputs
(list pkg-config))
(inputs
(list lua-5.1
gtk+
gsettings-desktop-schemas
glib-networking
lua5.1-filesystem
luajit
webkitgtk-with-libsoup2
sqlite))
(synopsis "Fast, lightweight, and simple browser based on WebKit")
(description "Luakit is a fast, lightweight, and simple to use
micro-browser framework extensible by Lua using the WebKit web content engine