Archived
1
0
Fork 0

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