Archived
1
0
Fork 0

gnu: lua-cqueues: Update to 20200726.

* gnu/packages/lua.scm (lua-cqueues): Update to 20200726.
[source]: Fetch from git repository.
[arguments]: Use G-expressions; disable two tests that need LuaJIT's ffi
module.

Change-Id: I969a9f173339d22e57fd6a5e4689889c0268c52d
This commit is contained in:
Ricardo Wurmus 2024-04-16 11:59:34 +02:00
parent 9374b0fe52
commit e2ec85d17d
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -485,86 +485,87 @@ secure session between the peers.")
(define (make-lua-cqueues name lua lua-ossl) (define (make-lua-cqueues name lua lua-ossl)
(package (package
(name name) (name name)
(version "20171014") (version "20200726")
(source (origin (source (origin
(method url-fetch) (method git-fetch)
(uri (string-append "https://25thandclement.com/~william/" (uri (git-reference
"projects/releases/cqueues-" version ".tgz")) (url "https://github.com/wahern/cqueues")
(commit (string-append "rel-" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb")))) "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:modules ((guix build gnu-build-system) (list
#:modules '((guix build gnu-build-system)
(guix build utils) (guix build utils)
(ice-9 string-fun)) (ice-9 string-fun))
#:make-flags #:make-flags
(let ((out (assoc-ref %outputs "out")) #~(let ((lua-api-version #$(version-major+minor (package-version lua))))
(lua-api-version ,(version-major+minor (package-version lua)))) (list (string-append "CC=" #$(cc-for-target))
(list ,(string-append "CC=" (cc-for-target)) (string-append "LUA_APIS=" lua-api-version)))
(string-append "LUA_APIS=" lua-api-version))) #:phases
#:phases #~(modify-phases %standard-phases
(modify-phases %standard-phases (delete 'configure)
(delete 'configure) (delete 'check)
(delete 'check) (replace 'install
(replace 'install (lambda* (#:key make-flags #:allow-other-keys)
(lambda* (#:key make-flags outputs #:allow-other-keys) (apply invoke "make" "install"
(let ((out (assoc-ref outputs "out"))) (append make-flags
(apply invoke "make" "install" (list (string-append "DESTDIR=" #$output)
(append make-flags "prefix=")))))
(list (string-append "DESTDIR=" out) (add-after 'install 'check
"prefix=")))))) (lambda* (#:key make-flags #:allow-other-keys)
(add-after 'install 'check (let*
(lambda* (#:key inputs outputs make-flags #:allow-other-keys) ((lua-version #$(version-major+minor (package-version lua)))
(let* (env-suffix (if (equal? lua-version "5.1")
((lua-version ,(version-major+minor (package-version lua))) ""
(env-suffix (if (equal? lua-version "5.1") (string-append
"" "_"
(string-append (string-replace-substring lua-version "." "_"))))
"_"
(string-replace-substring lua-version "." "_"))))
(lua-ossl (assoc-ref inputs "lua-ossl")) (lua-cpath (lambda (p)
(out (assoc-ref outputs "out")) (string-append p "/lib/lua/" lua-version "/?.so")))
(lua-path (lambda (p)
(string-append p "/share/lua/" lua-version "/?.lua"))))
;; The test suite sets Lua-version-specific search-path variables
;; when available so we must do the same, as these take
;; precedence over the generic "LUA_CPATH" and "LUA_PATH"
(setenv (string-append "LUA_CPATH" env-suffix)
(string-append
(string-join (map lua-cpath (list #$output #$lua-ossl)) ";")
";;"))
(setenv (string-append "LUA_PATH" env-suffix)
(string-append
(string-join (map lua-path (list #$output #$lua-ossl)) ";")
";;"))
(lua-cpath (lambda (p) ;; Skip regression tests we expect to fail
(string-append p "/lib/lua/" lua-version "/?.so"))) (with-directory-excursion "regress"
(lua-path (lambda (p) (for-each (lambda (f)
(string-append p "/share/lua/" lua-version "/?.lua")))) (rename-file f (string-append f ".skip")))
;; The test suite sets Lua-version-specific search-path variables (append
;; when available so we must do the same, as these take ;; Regression tests that require network
;; precedence over the generic "LUA_CPATH" and "LUA_PATH" ;; connectivity
(setenv (string-append "LUA_CPATH" env-suffix) '("22-client-dtls.lua"
(string-append "30-starttls-completion.lua"
(string-join (map lua-cpath (list out lua-ossl)) ";") "62-noname.lua"
";;")) "153-dns-resolvers.lua")
(setenv (string-append "LUA_PATH" env-suffix)
(string-append
(string-join (map lua-path (list out lua-ossl)) ";")
";;"))
;; Skip regression tests we expect to fail ;; Regression tests that require LuaJIT
(with-directory-excursion "regress" '("44-resolvers-gc.lua"
(for-each (lambda (f) "51-join-defunct-thread.lua"
(rename-file f (string-append f ".skip"))) ;; These both need the ffi module.
(append "73-starttls-buffering.lua"
;; Regression tests that require network "87-alpn-disappears.lua")
;; connectivity
'("22-client-dtls.lua"
"30-starttls-completion.lua"
"62-noname.lua"
"153-dns-resolvers.lua")
;; Regression tests that require LuaJIT ;; Regression tests that require Lua 5.3
'("44-resolvers-gc.lua" (if (not (equal? lua-version "5.3"))
"51-join-defunct-thread.lua") '("152-thread-integer-passing.lua")
'()))))
;; Regression tests that require Lua 5.3 (apply invoke "make" "check" make-flags)))))))
(if (not (equal? lua-version "5.3"))
'("152-thread-integer-passing.lua")
'()))))
(apply invoke "make" "check" make-flags)))))))
(native-inputs (native-inputs
(list m4)) (list m4))
(inputs (inputs