3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/http/couchdb/3.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.3 KiB
Nix
Raw Normal View History

2021-10-12 16:50:07 +01:00
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_78
2021-11-06 19:42:53 +00:00
, coreutils, bash, makeWrapper, python3, nixosTests }:
2020-04-04 10:20:03 +01:00
stdenv.mkDerivation rec {
pname = "couchdb";
2021-11-06 19:42:53 +00:00
version = "3.2.1";
2020-04-04 10:20:03 +01: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";
2021-11-06 19:42:53 +00:00
sha256 = "1y5cfic88drlr9qiwyj2p8xc9m9hcbvw77j5lwbp0cav78f2vphi";
2020-04-04 10:20:03 +01:00
};
2021-10-12 16:50:07 +01:00
buildInputs = [ erlang icu openssl spidermonkey_78 (python3.withPackages(ps: with ps; [ requests ]))];
2020-04-04 10:20:03 +01:00
postPatch = ''
2021-10-12 16:50:07 +01:00
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-78' "${spidermonkey_78.dev}/include/mozjs-78"
2020-04-04 10:20:03 +01:00
patchShebangs bin/rebar
'';
dontAddPrefix= "True";
2021-10-12 16:50:07 +01:00
configureFlags = ["--spidermonkey-version=78"];
2020-04-04 10:20:03 +01:00
buildFlags = ["release"];
installPhase = ''
mkdir -p $out
cp -r rel/couchdb/* $out
'';
2021-11-06 19:42:53 +00:00
passthru.tests = {
inherit (nixosTests) couchdb;
};
meta = with lib; {
2020-04-04 10:20:03 +01:00
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
homepage = "https://couchdb.apache.org";
2020-04-04 10:20:03 +01:00
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ lostnet ];
};
}