12 stdenv.mkDerivation rec {
17 url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
18 hash = "sha256-eiAHtfZz1L4iolyaER2QZpGdhy3bkTWn3OwBIimb054=";
22 substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91"
23 substituteInPlace configure --replace '/usr/include/''${SM_HEADERS}' "${spidermonkey_91.dev}/include/mozjs-91"
24 patchShebangs bin/rebar
25 '' + lib.optionalString stdenv.isDarwin ''
26 # LTO with Clang produces LLVM bitcode, which causes linking to fail quietly.
27 # (There are warnings, but no hard errors, and it produces an empty dylib.)
28 substituteInPlace src/jiffy/rebar.config.script --replace '"-flto"' '""'
39 (python3.withPackages(ps: with ps; [ requests ]))
42 dontAddPrefix= "True";
45 "--spidermonkey-version=91"
55 cp -r rel/couchdb/* $out
60 inherit (nixosTests) couchdb;
64 description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
65 homepage = "https://couchdb.apache.org";
66 license = licenses.asl20;
67 platforms = platforms.all;
68 maintainers = with maintainers; [ lostnet ];