2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_91
|
2022-08-21 13:32:41 +00:00
|
|
|
, coreutils, bash, python3, nixosTests }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "couchdb";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "3.3.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-m4nXtU9+9StCvVGmoKLTsbBszjld8smdjx9H+TVeK+4=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
erlang
|
|
|
|
];
|
|
|
|
buildInputs = [ icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))];
|
2020-09-25 04:45:31 +00:00
|
|
|
postPatch = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91"
|
2020-09-25 04:45:31 +00:00
|
|
|
patchShebangs bin/rebar
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontAddPrefix= "True";
|
2022-04-27 09:35:20 +00:00
|
|
|
configureFlags = ["--spidermonkey-version=91"];
|
2020-09-25 04:45:31 +00:00
|
|
|
buildFlags = ["release"];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r rel/couchdb/* $out
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) couchdb;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://couchdb.apache.org";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ lostnet ];
|
|
|
|
};
|
|
|
|
}
|