From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36528) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBclw-0001SR-Oa for guix-patches@gnu.org; Tue, 10 Mar 2020 07:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBclu-00053V-TW for guix-patches@gnu.org; Tue, 10 Mar 2020 07:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBclu-00052N-N6 for guix-patches@gnu.org; Tue, 10 Mar 2020 07:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jBclu-0000Oc-Fv for guix-patches@gnu.org; Tue, 10 Mar 2020 07:10:02 -0400 Subject: [bug#39881] Add couchdb Resent-Message-ID: Date: Tue, 10 Mar 2020 13:08:22 +0200 From: Efraim Flashner Message-ID: <20200310110822.GW1423@E5400> References: <20200303095049.GA2963@zpidnp36> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bgVZo3zXaTQrZhjg" Content-Disposition: inline In-Reply-To: <20200303095049.GA2963@zpidnp36> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Lars-Dominik Braun Cc: 39881@debbugs.gnu.org --bgVZo3zXaTQrZhjg Content-Type: multipart/mixed; boundary="6ysXqiu0yoUmUNJB" Content-Disposition: inline --6ysXqiu0yoUmUNJB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I touched up the couchdb patch a bit and there were a couple of things that stood out to me. The test suite passed for me without any problems. There are a couple of bundled fonts as well as bundled javascript inside the share directory, which also makes it to the output. Looking at %out/lib/ it looks like there are a bunch of other libraries bundled with couchdb. I don't know much about erlang but I assume all these libraries should be unbundled. Looking inside erlang I see there are also a lot of what looks like bundled libraries so I'm not really sure how that goes. On the other hand, after talking to you on IRC and looking at how Debian takes erlang=C2=B9 and seems to split it into dozens of package outputs I'm far more uncertain of how it works. Anyway, take a look at the changes I made and see if anything/everything works :) =C2=B9 https://sources.debian.org/src/erlang/1:23.0%7Erc1+dfsg-1/debian/pat= terns/ --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --6ysXqiu0yoUmUNJB Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-couchdb.patch" Content-Transfer-Encoding: quoted-printable =46rom 238b40d1da1e486392c69840ad9439e5bbb60c4a Mon Sep 17 00:00:00 2001 =46rom: Lars-Dominik Braun Date: Tue, 3 Mar 2020 10:38:40 +0100 Subject: [PATCH] gnu: Add couchdb. * gnu/packages/databases.scm (couchdb): New variable. --- gnu/packages/databases.scm | 91 +++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c8d12f43b5..063292c68a 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -74,15 +74,17 @@ #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages dbm) #:use-module (gnu packages emacs) + #:use-module (gnu packages erlang) #:use-module (gnu packages flex) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) + #:use-module (gnu packages gnuzilla) #:use-module (gnu packages guile) - #:use-module (gnu packages time) #:use-module (gnu packages golang) #:use-module (gnu packages jemalloc) + #:use-module (gnu packages icu4c) #:use-module (gnu packages language) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) @@ -110,6 +112,7 @@ #:use-module (gnu packages tcl) #:use-module (gnu packages terminals) #:use-module (gnu packages textutils) + #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages valgrind) #:use-module (gnu packages web) @@ -3403,3 +3406,89 @@ The drivers officially supported by @code{libdbi} ar= e: PostreSQL, SQLite, ODBC and MySQL.") (home-page "http://soci.sourceforge.net/") (license license:boost1.0))) + +(define-public couchdb + (package + (name "couchdb") + (version "3.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "mirror://apache/couchdb/source/" version + "/apache-couchdb-" version ".tar.gz")) + (sha256 + (base32 + "1nbz2vafzhp9jv8xna8cfnf99jwn22xs4ydzm426qx7yf0dbn2fi")) + (modules '((guix build utils))) + ;; TODO: Unbundle fonts, others from share/docs/html/_static, share= /www, share/server + ;; Remove pre-built binary, will be rebuilt. + (snippet '(begin (delete-file "bin/rebar") #t)))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("release" + "CC=3Dgcc") + #:configure-flags (list "--skip-deps" + "--spidermonkey-version" + ,(version-major (package-version mozjs-60))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/couch/rebar.config.script" + (("/usr/include/mozjs-60") + (string-append (assoc-ref inputs "mozjs") "/include/mozjs-= 60"))) + (substitute* "Makefile" + ;; Disable python-black code formatting. + (("check: all python-black") "check: all") + ;; Disable venv creation and package installation. + (("python3 -m venv .venv") "true") + (("\\.venv/bin/python3 -m pip install -r requirements.txt")= "true") + ;; Do not test elixir, depends on `mix` and several externa= l dependencies. + (("@\\$\\(MAKE\\) elixir") "") + ;; Use system python. + (("\\.venv/bin/python3") (which "python3"))) + #t)) + (replace 'configure + (lambda* (#:key (configure-flags '()) #:allow-other-keys) + (apply invoke "./configure" configure-flags))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; CouchDB tries to bundle erts, use our own copy. + (let ((out (assoc-ref outputs "out")) + (erts-version "10.3.5.9")) + (delete-file-recursively + (string-append "rel/couchdb/erts-" erts-version)) + (substitute* '("rel/couchdb/bin/couchdb" + "rel/couchdb/bin/remsh") + (("ROOTDIR=3D\\$\\{ERTS_BIN_DIR%/\\*\\}") + (string-append "ROOTDIR=3D" out)) + (("BINDIR=3D\"[^\"]+\"") + (string-append + "BINDIR=3D" (assoc-ref inputs "erlang") + "/lib/erlang/erts-" erts-version "/bin"))) + (copy-recursively "rel/couchdb" out)) + #t))))) + (native-inputs + ;; for tests + `(("curl" ,curl) + ("python" ,python) + ("python-hypothesis" ,python-hypothesis) + ("python-nose" ,python-nose) + ("python-requests" ,python-requests) + ;; for documentation + ("python-sphinx" ,python-sphinx))) + (inputs + `(("erlang" ,erlang) + ("icu4c" ,icu4c) + ("mozjs" ,mozjs-60) + ("openssl" ,openssl))) + (home-page "https://couchdb.apache.org/") + (synopsis "Document-oriented NoSQL database, implemented in Erlang") + (description "CouchDB is a database that completely embraces the web. = Store +your data with JSON documents. Access your documents with your web browse= r, via +HTTP. Query, combine, and transform your documents with JavaScript. Couc= hDB +works well with modern web and mobile apps. You can distribute your data, +efficiently using CouchDB=E2=80=99s incremental replication. CouchDB supp= orts +master-master setups with automatic conflict detection.") + (license license:asl2.0))) --=20 2.25.1 --6ysXqiu0yoUmUNJB-- --bgVZo3zXaTQrZhjg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5ndSMACgkQQarn3Mo9 g1GAvQ/+OvJTqo2fxxYwRZKsBcGuWpCIaTeN9vfKEcDjRgop6dU66KnXzKiyYCDq DU+VIWfv017FSjgCweN1JKLGvxn/uWGyXSZjclD9ba0gDm1LTLfvnwszj5AW6d+j biRHMx+Gta9edXW2IjLshDl4b4TXv+oto+zN2MD8QT7s/BXdNxvuUGpa7PlJay3T HrvYnTFRNRt5xWJMbXPIu+Ooa/tTZHDay8KUg+yixQXSKGp/wxTaOvKA00Uv3izS GclOtbROIKMv5VY5jtzwzStIMuFqaC5FzP0d4yQxVWQc06glPXe1UhAEZXPqAv95 I2Fo2wBV4EjFejqWarKppGH5l6qUt90jVFLn/ZFtTPVQ2ySD3yl4tIJDnlatTOND SBYXLe34JcqFA3lXN7EZJGBwat0jRavd77UOM9GGN3x3qNoMC7a71YuZ4RgnEmFR aCI+etoEeH/Gd1y3gvDDA+FRtF0XrHPVIcBYy2hklgQAM65cay9zq2nMTEqVzzwA AIeKcR34TN6i+U1IQiWD01XCdSHdSpkbphgLAJIcZF6TKfNgbgw1o6fzLhxtwAae jZiZDLTVHCP6TuUNdrX1AM7KLHYY9zKXGVYTjz6wZDsxKZ5I6hxSzq3DO1DNUL9b 3dU41oR7qWFfShvzxCANDpHckQI2JCeriOvJbEIecgnLigjoOvo= =Sttu -----END PGP SIGNATURE----- --bgVZo3zXaTQrZhjg--