1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/servers/http/couchdb/3.nix
2020-09-11 14:03:16 +02:00

39 lines
1.2 KiB
Nix

{ stdenv, fetchurl, erlang, icu, openssl, spidermonkey
, coreutils, bash, makeWrapper, python3 }:
stdenv.mkDerivation rec {
pname = "couchdb";
version = "3.1.0";
# 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";
sha256 = "1vgqj3zsrkdqgnwzji3mqkapnfd6kq466f5xnya0fvzzl6bcfrs8";
};
buildInputs = [ erlang icu openssl spidermonkey (python3.withPackages(ps: with ps; [ requests ]))];
postPatch = ''
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-68' "${spidermonkey.dev}/include/mozjs-68"
patchShebangs bin/rebar
'';
dontAddPrefix= "True";
configureFlags = ["--spidermonkey-version=68"];
buildFlags = ["release"];
installPhase = ''
mkdir -p $out
cp -r rel/couchdb/* $out
'';
meta = with stdenv.lib; {
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 ];
};
}