From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yJNuJtzIRmI4NQAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 11:41:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2ETnI9zIRmKqFAAA9RJhRA (envelope-from ) for ; Fri, 01 Apr 2022 11:41:48 +0200 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 E792017079 for ; Fri, 1 Apr 2022 11:41:47 +0200 (CEST) Received: from localhost ([::1]:49494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naDms-0008QF-Cs for larch@yhetil.org; Fri, 01 Apr 2022 05:41:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naDWh-00070r-3c for guix-patches@gnu.org; Fri, 01 Apr 2022 05:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naDWg-0007ky-Py for guix-patches@gnu.org; Fri, 01 Apr 2022 05:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naDWg-00025g-G9 for guix-patches@gnu.org; Fri, 01 Apr 2022 05:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54581] Add emacs-sqlite3-api package Resent-From: Roman Scherer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 09:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54581 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Maxime Devos Cc: 54581@debbugs.gnu.org Received: via spool by 54581-submit@debbugs.gnu.org id=B54581.16488050757993 (code B ref 54581); Fri, 01 Apr 2022 09:25:02 +0000 Received: (at 54581) by debbugs.gnu.org; 1 Apr 2022 09:24:35 +0000 Received: from localhost ([127.0.0.1]:40891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naDWB-00024n-F2 for submit@debbugs.gnu.org; Fri, 01 Apr 2022 05:24:34 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:41791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naDW9-00024a-Df for 54581@debbugs.gnu.org; Fri, 01 Apr 2022 05:24:30 -0400 Received: by mail-wr1-f41.google.com with SMTP id h23so3307218wrb.8 for <54581@debbugs.gnu.org>; Fri, 01 Apr 2022 02:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=cEWERqTYk28P5vI44U5JeIsMS/jtS4GFD+jml7tuhlI=; b=H7R8+oytfKSdLSECbcEy0+S20uh/XxqrZVmg604W3h2OGfGVSvPXdH4Q/iOh/Zgd7O cYOtRszZgZiUbptmbm4JCCUXn4IVE99h93POBkviWGorqshXaPNdE5LvJSX5ofZOEF3S OXsGoCv5v1Ha7IiTNFrex2UM32FyhwYOa/bhLBbaR7NkMKqFZnm9zz22vK0VKpImFj4G ZAXsXXtGTu3gXE/BgCY6nizhg4cnj/qrdKBYIknPZxpeuUn1cKvhh4/5vvDcTivJZpBT 3IwtIlCDvvYXcbAJqJuRfj6qT85eExwg+6P6OZKaQp8eqWtKSoHBBkAlilPFCby1zLXO vnRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=cEWERqTYk28P5vI44U5JeIsMS/jtS4GFD+jml7tuhlI=; b=WLpReYgLmPSkSidl4vL0U4GQAKf++aFoNHEAP+WxQ1HCX5ljT7Ht+Ark4Ji7LHy5Yy wh2JjCfzJQetV12HGQU3PfQ0UjKbDZaHoDLe50QUIANd0I2fAU3eMzgYeuzjFeCuyb98 zNt8necFgmGOETyE4jKzBNUe3GSFxiDGKH5JXuLVhg5x8MXPDOeyn91J0zq6WOLRcHog H/CMpcKlNolFOADfXoC4Q9DYMmKgYWQ6sBPkGeSIw2HsNtq7mNuw6ZgZf8X5ynotvCIe i1dVL/vy/bxfGzsSuPOktcWLJt2FuD8gPyhX4Hj5KW98tkUN8CJerM4BjysCUEGbX8NI RxKA== X-Gm-Message-State: AOAM5316DHULvWx55zuov4vbisXuniYBOUHHjiTYqWA5IJDbvpAWrJRy 5FaLmVFYnW9YIJ6OhzbgHLcW/GiRS4VsJiVi X-Google-Smtp-Source: ABdhPJytukX4npAAPN2FeAfQg+eEf+xlDLjO+k4P1eNDzL1ipWzMrQ4tRa3WPlRZIn9YTQ1kO/PONA== X-Received: by 2002:adf:fc0a:0:b0:203:ee19:b4a5 with SMTP id i10-20020adffc0a000000b00203ee19b4a5mr7226960wrr.245.1648805063058; Fri, 01 Apr 2022 02:24:23 -0700 (PDT) Received: from thinkpad (tmo-117-244.customers.d1-online.com. [80.187.117.244]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c350800b0038cc9096507sm10237363wmq.3.2022.04.01.02.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 02:24:22 -0700 (PDT) References: <87ils0g5uz.fsf@burningswell.com> <87zglbs1hp.fsf@burningswell.com> <6cf98cd1d3915a9808c1e074cfa6807d2f570322.camel@telenet.be> User-agent: mu4e 1.6.10; emacs 28.0.50 From: Roman Scherer Date: Fri, 01 Apr 2022 11:07:57 +0200 In-reply-to: <6cf98cd1d3915a9808c1e074cfa6807d2f570322.camel@telenet.be> Message-ID: <87k0c9kvgb.fsf@burningswell.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648806108; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=cEWERqTYk28P5vI44U5JeIsMS/jtS4GFD+jml7tuhlI=; b=bn9arLa0RLXiu9esk1DmDqtHpkg3i5eMTbIeXcyOVNE7F03Pp70J07uJHibdRepX2k7qb8 FSAkvBeuc72F/oH646bE3y6tpyP4IYMEsDYis8DWtvpHIVTqulPZayYJ0jYr1aDJC61HrS 06zcLbZkfTkVWg95KL6urshrxhQvbxNgSahDWYbEA6up1MX84O8QWTUQPDszkwWc7k3WOC Ab7rXcPPp30eA6Z7ohex+lRJOatLjlnnzPfoWTpZldLhfNXxcRoWxBnGFLvGP2ASSiFFX+ WCQ7piyVIQdtJBgWZh1zXr6YmJwu7ZRdHL2sfSbZ9P6Gnj/3zgJv7bl4uiA+lw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648806108; a=rsa-sha256; cv=none; b=PJhALawOamMJ1wII0NX4D6XTrGXd8MIPq4DqKb9HLprg5wNGlS6guYgs4lqVBfiUOaMIa1 F5q049fYL6N5Alzd8l8wlvShN1Xkrpxxx4ffaxj3ThbBQp898VcsPQ+6ziLMqU/ObaTeW6 Pd7Gdyz78aI13FuLwhUGDprrdXVq0y3L5KUKuJOAgiO9feE3f3wiGZJiEj7bTDAiRysIYi fP1ee+/l+Tn5gpNsUguZGyfQgYLxZX8T0NbfcZIzYdIpfeOeeUJqHfu6/pMpiv0GYKrArY vs5ju15kf77TV3zFwzoTXt4um+VYo+h2sDtjgjvkrMbWdGJWs39oVRvYr5JApg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b=H7R8+oyt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=burningswell-com.20210112.gappssmtp.com header.s=20210112 header.b=H7R8+oyt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E792017079 X-Spam-Score: -1.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: MVMRq6Y+4+I4 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Maxime, here's a new patch as per your suggestion. I'm removing the code that downloads from the internet, and the call to date for the NOW variable. I also remove the SQLITE_STATIC and SQLITE_TRANSIENT sections in the generated constants.c file, they cause a warning and would have been remove by the original script. I changed the #:tests? keyword to (%current-target-system), but I noticed the tests of the package are now not run anymore when I build the package. Is this expected? I tried to specify a target when building the package, but this gives me the following error: ./pre-inst-env guix build emacs-sqlite3-api --target=3Dx86_64 guix build: error: /home/roman/workspace/guix/gnu/packages/emacs-xyz.scm:57= 38:4: emacs-sqlite3-api@0.15-0.7cb4b66: build system `emacs' does not suppo= rt cross builds Do you know how I can trigger the tests when building this package from the command line, or even better from within Emacs? Maxime Devos writes: > [[PGP Signed Part:Undecided]] > Roman Scherer schreef op zo 27-03-2022 om 19:55 [+0200]: >> I think my preference would be to go without generating the consts.c >> file, the patch works, it uses the same file the maintainer of the >> packages is using, and I believe it is less brittle. :) > > I don't expect any practical problems but technically it isn't source > code, and rather a binary (or, as GPL words it, =E2=80=98object code=E2= =80=99), at > least according to the GPL's definition: > > The "source code" for a work means the preferred form of the work > for making modifications to it. "Object code" means any non-source > form of a work. > > , and Guix builds things from source. I don't think constants.c is in > preferred form, rather it seems to be sqlite.h > > Maybe it's not much of a problem here though, I donk't know. > > I don't see the relevancy of what files the maintainer is using. What > does maintainerhood have to do with anything? Well, I was looking at the last time the consts.c has been modified by the maintainer and it was 2 years ago. I was thinking it would be more stable to use the code that ships with the repository, rather than building something from the internet which hasn't been updated for 2 years. But if this file is considered object code, ok. > Greetings, > Maxime. > > [[End of PGP Signed Part]] --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-emacs-sqlite3-api-package.patch Content-Transfer-Encoding: quoted-printable From=2016a89de32c9ef7458e852169e62eb08f008a6a2b Mon Sep 17 00:00:00 2001 From: r0man Date: Sat, 26 Mar 2022 14:59:01 +0100 Subject: [PATCH] Add emacs-sqlite3-api package This patch adds the emacs-sqlite3-api package to Guix. The package provides a dynamic module for Emacs that allows direct access to the SQLite C interface. It only exposes a subset of the full SQLite C interface, but should satisfy most user's needs. The original source code uses a file called constants.c, which is checked i= nto the repository, but can be generated by running make in the tools directory= of the source. However, the procedure to generate this file downloads a list of constants from the SQLite website. We are patching the scripts to generate those constants, to not download anything from the internet to have a stable build process. =2D-- gnu/packages/emacs-xyz.scm | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 42fc13f4c2..b4eacce952 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5731,6 +5731,67 @@ (define-public emacs-sqlite It is not intended as a user interface.") (license license:gpl3+)))) =20 +(define-public emacs-sqlite3-api + (let ((version "0.15") + (revision "0") + (commit "7cb4b660fe30deb8a4229f3abb18bd99ca9c971c")) + (package + (name "emacs-sqlite3-api") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pekingduck/emacs-sqlite3-ap= i") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1b7if1dp6i5kqwhq25gna89xbca66i4mmgx1a5yn12kncfdgs6d7"))= )) + (build-system emacs-build-system) + (arguments + `(#:modules ((guix build emacs-build-system) + (guix build emacs-utils) + (guix build utils)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-module-load + (lambda* (#:key outputs #:allow-other-keys) + (chmod "sqlite3.el" #o644) + (emacs-substitute-sexps "sqlite3.el" + ("(require 'sqlite3-api nil t)" + `(module-load ,(string-append (assoc-ref outputs "out") + "/lib/sqlite3-api.so")))))) + (add-before 'check 'build-emacs-module + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove code that fetches constants from the SQLite websi= te + ;; and the call to generate a timestamp. + (invoke "sed" "--in-place" "3,4d;24,28d;31d" "tools/gen-con= sts.sh") + ;; Remove filter logic from the script that generates the c= onstants. + (invoke "sed" "--in-place" "7,11d;18,22d" "tools/gen-consts= .py") + ;; Generate the consts.c file. + (invoke "make" "--directory=3Dtools") + ;; Remove the SQLITE_STATIC and SQLITE_TRANSIENT + ;; constants. They cause a compilation warning and would ha= ve + ;; been removed by the original script. + (invoke "sed" "--in-place" "/ifdef SQLITE_STATIC/,+2d" "con= sts.c") + (invoke "sed" "--in-place" "/ifdef SQLITE_TRANSIENT/,+2d" "= consts.c") + ;; Compile the shared object file. + (invoke "make" (string-append "CC=3D" ,(cc-for-target))) + ;; Move the shared object file into /lib. + (install-file "sqlite3-api.so" + (string-append (assoc-ref outputs "out") + "/lib"))))) + #:tests? ,(%current-target-system) + #:test-command '("make" "test" "EMACS=3Demacs"))) + (inputs (list sqlite)) + (native-inputs (list python sed)) + (home-page "https://github.com/pekingduck/emacs-sqlite3-api") + (synopsis "SQLite dynamic module for Emacs Lisp") + (description "This package provides a dynamic module for Emacs that = allows +direct access to the SQLite C interface. It only exposes a subset of the = full +SQLite C interface, but should satisfy most user's needs.") + (license license:gpl3+)))) + (define-public emacs-sr-speedbar (let ((commit "77a83fb50f763a465c021eca7343243f465b4a47") (revision "0")) =2D-=20 2.34.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmJGxMQfHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmWWWB/95+RY9RJ7GdMAW D2kF5+YEqB0mx3OvUT5VuZgk712KQmON95KEHUkakc2Zu1VU6gKyavNhplinnAC+ Z2PbZHyYmOMQuAmKYjGLiFq96JSGBiiju3h9GAu4B3gNPNntkjjN5abx56cg+ePk WS20eOJmC+S14DoTvZG29T9CAxUf/c7YOy4avv7SyMzWsuNv4+63Tv/Ksp/5lOks 7cGyYSOvbS3AuLtOLwmGehbtVZzohDVUA8MwqVeyjhzoy1W6RGnghtTFLvzvVpbd 8IVl9AQEVvA0RFoNIX800JRYwMBWPPPKhyvdO21PfQFQCvOERS9Lp1M8bNiPDqsF gzSZjSkJ =2bTI -----END PGP SIGNATURE----- --==-=-=--