mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
34ba6c7e16
https://docs.couchdb.org/en/latest/whatsnew/3.3.html#version-3-3-2 https://docs.couchdb.org/en/latest/cve/2023-26268.html Fixes: CVE-2023-26268
67 lines
1.4 KiB
Nix
67 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, erlang
|
|
, icu
|
|
, openssl
|
|
, spidermonkey_91
|
|
, python3
|
|
, nixosTests
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "couchdb";
|
|
version = "3.3.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
|
|
hash = "sha256-PWgj1C0Qzw1PhsnE/lnJkyyJ1oV4/LbEtCeNx2kwjao=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91"
|
|
substituteInPlace configure --replace '/usr/include/''${SM_HEADERS}' "${spidermonkey_91.dev}/include/mozjs-91"
|
|
patchShebangs bin/rebar
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
erlang
|
|
];
|
|
|
|
buildInputs = [
|
|
icu
|
|
openssl
|
|
spidermonkey_91
|
|
(python3.withPackages(ps: with ps; [ requests ]))
|
|
];
|
|
|
|
dontAddPrefix= "True";
|
|
|
|
configureFlags = [
|
|
"--spidermonkey-version=91"
|
|
];
|
|
|
|
buildFlags = [
|
|
"release"
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out
|
|
cp -r rel/couchdb/* $out
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) couchdb;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
|
|
homepage = "https://couchdb.apache.org";
|
|
license = licenses.asl20;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ lostnet ];
|
|
};
|
|
}
|