From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 oAxUO6mqQGJw/AAAgWs5BA (envelope-from ) for ; Sun, 27 Mar 2022 20:19:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ME91M6mqQGIWEwEAG6o9tA (envelope-from ) for ; Sun, 27 Mar 2022 20:19:21 +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 4C4B0353E2 for ; Sun, 27 Mar 2022 20:19:21 +0200 (CEST) Received: from localhost ([::1]:53572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYXU0-00078q-Gf for larch@yhetil.org; Sun, 27 Mar 2022 14:19:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYXTi-0006Vn-Sw for guix-patches@gnu.org; Sun, 27 Mar 2022 14:19:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYXTi-000209-KW for guix-patches@gnu.org; Sun, 27 Mar 2022 14:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYXTi-0007sG-8E for guix-patches@gnu.org; Sun, 27 Mar 2022 14:19: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: Sun, 27 Mar 2022 18:19: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.164840511830236 (code B ref 54581); Sun, 27 Mar 2022 18:19:02 +0000 Received: (at 54581) by debbugs.gnu.org; 27 Mar 2022 18:18:38 +0000 Received: from localhost ([127.0.0.1]:56519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYXTK-0007rb-7g for submit@debbugs.gnu.org; Sun, 27 Mar 2022 14:18:38 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:51151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYXTH-0007rO-TN for 54581@debbugs.gnu.org; Sun, 27 Mar 2022 14:18:37 -0400 Received: by mail-wm1-f48.google.com with SMTP id h16so7146741wmd.0 for <54581@debbugs.gnu.org>; Sun, 27 Mar 2022 11:18:35 -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=4e3JpOYwLTWvQ7rAQHsjCJBV0TNbBRNfdk3Z5Gsl0dQ=; b=J8fTX2B40qE140BJS3SZGchAKUJ+MMWmLQfKji7Fk9P4T4Z8JikDribCZPOYvpoj4s o5lQhaVblb7jAlcp9ci/6oIIiMz/IS1Pkp5fm0nwj5YEeZYCMGJPgV7tqrN42QXrVJdx cHlv/Wm6AuXUqP7Myv1G8DH3JvmuHw2WYlAZVYUIc0Nme7S37KNwtTvQGBHPNHisudAe DgKI7gnj4PTW87VLqc8gj4NIgfWYOdtYk+Er9XplUdOufwFNdAFX6nrf/CUn5inHVrQZ I0qmRbz3cExlSlsVr4jEgHjc+eqRFginHLnFCCe+gHwvz2SyWMltgcL4qmYOyYXZG615 OW+w== 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=4e3JpOYwLTWvQ7rAQHsjCJBV0TNbBRNfdk3Z5Gsl0dQ=; b=RVOk8UaYD5rvaSR1UmVlL6w8tQ3gTQr7dNN6q+EYHsJDIvzm/muJlbl21+H1qr3QPZ phTkZbCX/Q1Rvqh3Y8an7dYRDq9T81NPT2LT09aWopj6UQ3i3KIwImkArM9XrnYZBlUZ q1I7ekDkvEdbChMuRby8iCcQTX/w95O9355cIWFaiYoGQ/5n9OCtKaQ8k66dO3KtMo72 AGrZEKecjZ8GGT9UiBtCGMBrreAliOCZG6QUx5i6uzFd7PBE/msmCKvwkTOrC9etsW6P XD5a0+Fea+edjkQqEXkD81AaCaeoukXrGIwdJfpoHQapmCLpOmIU61hwHoE/mQ24JR9S efCw== X-Gm-Message-State: AOAM530rW3luedCxVOP2CLQiZn+KW2FN/5uoc1umW4HBnrn0Qg+oZC3r hKJsZ+DYRtO7JrsjBGJ5TGrYDu1QStM8icpe X-Google-Smtp-Source: ABdhPJwA+OfT8i+mAqBi3i6EBGf+QjTsXE0/GN+1trMbT5xinBIMSImnj0DyO6Sx9RsMP5zbxrm7cA== X-Received: by 2002:a05:600c:3548:b0:38c:e73d:e0e0 with SMTP id i8-20020a05600c354800b0038ce73de0e0mr14729765wmq.158.1648405109521; Sun, 27 Mar 2022 11:18:29 -0700 (PDT) Received: from thinkpad (tmo-116-228.customers.d1-online.com. [80.187.116.228]) by smtp.gmail.com with ESMTPSA id az26-20020adfe19a000000b00204154a1d1fsm10191594wrb.88.2022.03.27.11.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 11:18:28 -0700 (PDT) References: <87ils0g5uz.fsf@burningswell.com> User-agent: mu4e 1.6.10; emacs 28.0.92 From: Roman Scherer Date: Sun, 27 Mar 2022 19:55:16 +0200 In-reply-to: Message-ID: <87zglbs1hp.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=1648405161; 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=4e3JpOYwLTWvQ7rAQHsjCJBV0TNbBRNfdk3Z5Gsl0dQ=; b=l5gO109UoiHAWOKW5TNynpS9ob18bSsjKFKvAe/x0wtz3caS9AE/xcbBOh6LDghDqiopo4 xCGjNfwCsG+iM9e0bsUlCottExmL4DoLnfWQd9ybNbMrpjFdvf4i+YiBZYbBRDKcjERbqw J7sksS1A5ppuBLcWER4ZZHvVvVtIzFk9U0KbtNXgVNL2OEq4NDkV8xYkfxki7wUB2kukuo tNXUe9+7sL7LlZkKw+l4hXQpu/PjwHkdkh7HSwbgEXFHr+sbVJaPQCqwYKEU0l9weiAXbl 0xFjGgXINnGq6bbiVldUaJ2HEFWUCrLgFKAdkRzxur7TtN26AQCapk/YSxZLLQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648405161; a=rsa-sha256; cv=none; b=RtiawA717A79dGWJ/OShr5a93T7MWEpDwScYZGLaKxxIGFJd2kVbc7q6oznk/BtT8XJAPC sCNrLQuGSUqqnwruG9DfZS9XkSCiT/zRfbzUSDcwzWmDv8dQ0tzmLl1neM5JethOjr6KBk prYWO3o8lW5wDxAiD04ZLPBMybmNCEG/MP/UeoKRBshDDxuWBm//d6001YEsEc59QV76s/ eOxNIFS1+Ospaenv8Tie/dMrRGoro5Vx8qfEU8NOGlygoqcWrXq8R1+iswGuFJaC/Ca8wq TiQ4lLKOI9FUNwDScEz2DCYRlTjxp08XeCBpjyOq+GTHiQKt9hKtBvEcf8w+Tg== 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=J8fTX2B4; 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=J8fTX2B4; 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: 4C4B0353E2 X-Spam-Score: -1.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: Y8e58I457Z7i --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi Maxime, thanks for the review. I attached 2 patches. 0001-Add-emacs-sqlite3-api-package.patch In this one I addressed your following comments: - I changed the synopsis and the description - Removed the make flags - I'm using cc-for-target now - Enabled tests The tests are passing, and I tested it manually by evaluating the Emacs Lisp code snippets in [1]. Everything seems to work fine. 0001-Add-emacs-sqlite3-api-package-generate-constants.patch In this patch I did the same as above, and I generated the consts.c file by running make in the "tools" directory. The tests are passing fine, but when I manually test it by evaluating the Elisp snippets in [1] I get an error that the sqlite-open-readwrite and sqlite-open-create are not defined in Emacs. The .so file is loaded by Emacs but somehow it does not work. I looked at the diff between the consts.c committed in the repository and the generated one, but I could not see any changes related to those functions. I'm still a bit lost about this and could need some help. But I also wonder if generating the consts.c file is actually better than just using the checked in consts.c file. The command to generate the file fetches a web page from the Sqlite website and builds the consts.c file with this information. And I think this is kind of a brittle approach. How would this approach would even work with Software heritage? 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. :) What do you think? [1] https://github.com/pekingduck/emacs-sqlite3-api#introduction --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-emacs-sqlite3-api-package.patch Content-Transfer-Encoding: quoted-printable From=20b1568732c8aa95aa8f6cd914a903be2f807c252d 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. =2D-- gnu/packages/emacs-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 42fc13f4c2..dad0fe62e8 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5731,6 +5731,54 @@ (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 (make-flags '()) outputs #:allow-other-keys) + ;; 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? #t + #:test-command '("make" "test" "EMACS=3Demacs"))) + (inputs (list sqlite)) + (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: text/x-patch Content-Disposition: inline; filename=0001-Add-emacs-sqlite3-api-package-generate-constants.patch Content-Transfer-Encoding: quoted-printable From=20f2726c3c87d890dfb547e7e9de880c5c57954ccf 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. =2D-- gnu/packages/emacs-xyz.scm | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 42fc13f4c2..87595db74c 100644 =2D-- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5731,6 +5731,57 @@ (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 (make-flags '()) outputs #:allow-other-keys) + ;; Generate the consts.c file. + (invoke "make" "--directory=3Dtools") + ;; 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? #t + #:test-command '("make" "test" "EMACS=3Demacs"))) + (inputs (list sqlite)) + (native-inputs (list curl pandoc python)) + (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: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Maxime Devos writes: > [[PGP Signed Part:Undecided]] > Roman Scherer schreef op za 26-03-2022 om 15:09 [+0100]: >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:phases >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (modify-phases %standa= rd-phases > > Could consts.c be built from source? > > [[End of PGP Signed Part]] --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmJAqnIfHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmSWuB/41UFRW2n5UVbRD HG+WvqboNHotLTykD7N413lCnMmnS7jihKdW6W9S+P6t3Ac9y8ikECu2js6oOZ2V 8tyctADHVdnH7bjAFcxYo/XJwBmAOgoJybrC3HCGajD9h4jgljAFjk7ovDMVrJpL g9l5wcIYlyixTFuSkBN+TlQzdGUS8CClcVA7aYm4bo0O+7j3jU1uIkC3wZhzAuMq BtvGjVzh16W3R8qYz2+Ge2g+FvOzl+ku0prqncSA8+N7rEkwvfWAR5h0LWe100ed Q48Au8uyV5Dk1yckDqYgzWCWAffLwpxT4CSIPH/3Q4ALCAbpRhqY4YgQJOd59NSt sj+yNPmT =hwKb -----END PGP SIGNATURE----- --==-=-=--