Subject: [bug#39881] Add couchdb

From: Lars-Dominik Braun <[email-masked]>
Date: Thu, 12 Mar 2020 10:07:26 +0100

Hi Efraim,

> There are a couple of bundled fonts as well as bundled javascript inside
> the share directory, which also makes it to the output.
we can probably unbundle fontawesome, but not their own font. The web frontend
(fauxton) depends on NPM and a bunch of JavaScript packages – nothing we can do
about that.

> 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.
As far as I see there is a mix between bundled external libraries and those
internal to couchdb. External libraries in src/ are:

- bear (https://github.com/boundary/bear)
- dreyfus (https://github.com/cloudant-labs/dreyfus)
- folsom (https://github.com/boundary/folsom)
- hyper (https://github.com/GameAnalytics/hyper)
- jiffy (https://github.com/davisp/jiffy)
- meck (https://github.com/eproxus/meck)
- mochiweb (https://github.com/mochi/mochiweb/)
- proper (https://github.com/proper-testing/proper)
- rebar (https://github.com/rebar/rebar)
- recon (https://github.com/ferd/recon)
- snappy (https://github.com/skunkwerks/snappy-erlang-nif)

All modules are also mirrored by the Apache project here
https://github.com/apache?q=couchdb&type=&language=
so it might be possible to build most of them “out of tree”, i.e. create
separate packages and somehow “link” to them. I’ll look into that when I have
some time, but I’m not an Erlang guru. In the meantime I’ll be maintaining the
package over here[1], since the current state is not good enough for inclusion
into guix.

> Anyway, take a look at the changes I made and see if anything/everything
> works :)
Yep, I can confirm the server and web interface are working.

Thanks for the review,
Lars

[1] https://github.com/leibniz-psychology/guix-zpid/blob/master/zpid/packages/couchdb.scm