2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_68
|
2020-04-04 11:20:03 +02:00
|
|
|
, coreutils, bash, makeWrapper, python3 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "couchdb";
|
2020-10-22 11:25:10 +02:00
|
|
|
version = "3.1.1";
|
2020-04-04 11:20:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
# when updating this, please consider bumping the erlang/OTP version
|
|
|
|
# in all-packages.nix
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
|
2020-10-22 11:25:10 +02:00
|
|
|
sha256 = "18wcqxrv2bz88xadkqpqznprrxmcmwr0g6k895xrm8rbp9mpdzlg";
|
2020-04-04 11:20:03 +02:00
|
|
|
};
|
|
|
|
|
2020-10-09 22:47:30 +02:00
|
|
|
buildInputs = [ erlang icu openssl spidermonkey_68 (python3.withPackages(ps: with ps; [ requests ]))];
|
2020-04-04 11:20:03 +02:00
|
|
|
postPatch = ''
|
2020-10-09 22:47:30 +02:00
|
|
|
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-68' "${spidermonkey_68.dev}/include/mozjs-68"
|
2020-04-04 11:20:03 +02:00
|
|
|
patchShebangs bin/rebar
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontAddPrefix= "True";
|
|
|
|
configureFlags = ["--spidermonkey-version=68"];
|
|
|
|
buildFlags = ["release"];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r rel/couchdb/* $out
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-04 11:20:03 +02:00
|
|
|
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
|
|
|
|
homepage = "http://couchdb.apache.org";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ lostnet ];
|
|
|
|
};
|
|
|
|
}
|