From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EPZnMihiwV7tDgAA0tVLHw (envelope-from ) for ; Sun, 17 May 2020 16:11:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sEQ3LihiwV74TwAA1q6Kng (envelope-from ) for ; Sun, 17 May 2020 16:11:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 48583940B0D for ; Sun, 17 May 2020 16:11:20 +0000 (UTC) Received: from localhost ([::1]:48584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaLsl-0001z9-7z for larch@yhetil.org; Sun, 17 May 2020 12:11:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaLrX-0001QL-6c for guix-patches@gnu.org; Sun, 17 May 2020 12:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaLrW-0003NO-TF for guix-patches@gnu.org; Sun, 17 May 2020 12:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaLrW-000632-No for guix-patches@gnu.org; Sun, 17 May 2020 12:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41363] [PATCH 1/3] gnu: Add lua-ossl. References: <878shqtyaa.fsf@mercury.simonsouth.net> In-Reply-To: <878shqtyaa.fsf@mercury.simonsouth.net> Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 May 2020 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41363 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 41363@debbugs.gnu.org Received: via spool by 41363-submit@debbugs.gnu.org id=B41363.158973180023225 (code B ref 41363); Sun, 17 May 2020 16:10:02 +0000 Received: (at 41363) by debbugs.gnu.org; 17 May 2020 16:10:00 +0000 Received: from localhost ([127.0.0.1]:44426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaLrU-00062V-Fs for submit@debbugs.gnu.org; Sun, 17 May 2020 12:10:00 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:48866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaLrS-000628-KW for 41363@debbugs.gnu.org; Sun, 17 May 2020 12:09:59 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 1AD2E211FF for <41363@debbugs.gnu.org>; Sun, 17 May 2020 16:09:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u0x4u2l3Yfx8 for <41363@debbugs.gnu.org>; Sun, 17 May 2020 16:09:52 +0000 (UTC) Received: from mercury.simonsouth.net (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id AD250211FB for <41363@debbugs.gnu.org>; Sun, 17 May 2020 16:09:52 +0000 (UTC) From: Simon South Date: Sun, 17 May 2020 12:09:38 -0400 Message-Id: <20200517160940.5132-1-simon@simonsouth.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: b6iU0ENzVx37 * gnu/packages/lua.scm (make-lua-ossl): New function. (lua-ossl, lua5.1-ossl, lua5.2-ossl): New variables. --- gnu/packages/lua.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 181ce76559..147ed8d9f7 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2020 Nicolas Goaziou +;;; Copyright © 2020 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +39,7 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages readline) + #:use-module (gnu packages m4) #:use-module (gnu packages tls) #:use-module (gnu packages xml) #:use-module (gnu packages glib) @@ -292,6 +294,67 @@ directory structure and file attributes.") (define-public lua5.2-filesystem (make-lua-filesystem "lua5.2-filesystem" lua-5.2)) +(define (make-lua-ossl name lua) + (package + (name name) + (version "20170903") + (source (origin + (method url-fetch) + (uri (string-append "https://25thandclement.com/~william/" + "projects/releases/luaossl-" version ".tgz")) + (sha256 + (base32 + "10392bvd0lzyibipblgiss09zlqh3a5zgqg1b9lgbybpqb9cv2k3")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((out (assoc-ref %outputs "out")) + (lua-api-version ,(version-major+minor (package-version lua)))) + (list "CC=gcc" + "CFLAGS='-D HAVE_SYS_SYSCTL_H=0'" ; sys/sysctl.h is deprecated + (string-append "DESTDIR=" out) + (string-append "LUA_APIS=" lua-api-version) + "prefix=")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (lua-version ,(version-major+minor (package-version lua)))) + (setenv "LUA_CPATH" + (string-append out "/lib/lua/" lua-version "/?.so;;")) + (setenv "LUA_PATH" + (string-append out "/share/lua/" lua-version "/?.lua;;")) + (with-directory-excursion "regress" + (for-each (lambda (f) + (invoke "lua" f)) + (find-files "." "^[0-9].*\\.lua$")))) + #t))))) + (native-inputs + `(("m4", m4))) + (inputs + `(("lua" ,lua) + ("openssl" ,openssl))) + (home-page "https://25thandclement.com/~william/projects/luaossl.html") + (synopsis "OpenSSL bindings for Lua") + (description "The luaossl extension module for Lua provides comprehensive, +low-level bindings to the OpenSSL library, including support for certificate and +key management, key generation, signature verification, and deep bindings to the +distinguished name, alternative name, and X.509v3 extension interfaces. It also +binds OpenSSL's bignum, message digest, HMAC, cipher, and CSPRNG interfaces.") + (license license:expat))) + +(define-public lua-ossl + (make-lua-ossl "lua-ossl" lua)) + +(define-public lua5.1-ossl + (make-lua-ossl "lua5.1-ossl" lua-5.1)) + +(define-public lua5.2-ossl + (make-lua-ossl "lua5.2-ossl" lua-5.2)) + (define (make-lua-sec name lua) (package (name name) -- 2.26.2