couchdb2: drop
This commit is contained in:
parent
b8caf0847c
commit
29bcaf04cb
|
@ -4,24 +4,17 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.services.couchdb;
|
||||
useVersion2 = strings.versionAtLeast (strings.getVersion cfg.package) "2.0";
|
||||
configFile = pkgs.writeText "couchdb.ini" (
|
||||
''
|
||||
[couchdb]
|
||||
database_dir = ${cfg.databaseDir}
|
||||
uri_file = ${cfg.uriFile}
|
||||
view_index_dir = ${cfg.viewIndexDir}
|
||||
'' + (if cfg.adminPass != null then
|
||||
''
|
||||
'' + (optionalString (cfg.adminPass != null) ''
|
||||
[admins]
|
||||
${cfg.adminUser} = ${cfg.adminPass}
|
||||
'' else
|
||||
"") + (if useVersion2 then
|
||||
''
|
||||
'' + ''
|
||||
[chttpd]
|
||||
'' else
|
||||
''
|
||||
[httpd]
|
||||
'') +
|
||||
''
|
||||
port = ${toString cfg.port}
|
||||
|
@ -30,8 +23,7 @@ let
|
|||
[log]
|
||||
file = ${cfg.logFile}
|
||||
'');
|
||||
executable = if useVersion2 then "${cfg.package}/bin/couchdb"
|
||||
else ''${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} -a ${cfg.configFile}'';
|
||||
executable = "${cfg.package}/bin/couchdb";
|
||||
|
||||
in {
|
||||
|
||||
|
@ -177,8 +169,7 @@ in {
|
|||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.couchdb.configFile = mkDefault
|
||||
(if useVersion2 then "/var/lib/couchdb/local.ini" else "/var/lib/couchdb/couchdb.ini");
|
||||
services.couchdb.configFile = mkDefault "/var/lib/couchdb/local.ini";
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
|
||||
|
@ -195,7 +186,7 @@ in {
|
|||
touch ${cfg.configFile}
|
||||
'';
|
||||
|
||||
environment = mkIf useVersion2 {
|
||||
environment = {
|
||||
# we are actually specifying 4 configuration files:
|
||||
# 1. the preinstalled default.ini
|
||||
# 2. the module configuration
|
||||
|
|
|
@ -24,8 +24,6 @@ with lib;
|
|||
};
|
||||
|
||||
nodes = {
|
||||
couchdb1 = makeNode pkgs.couchdb testuser testpass;
|
||||
couchdb2 = makeNode pkgs.couchdb2 testuser testpass;
|
||||
couchdb3 = makeNode pkgs.couchdb3 testuser testpass;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5
|
||||
, coreutils, bash, makeWrapper, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "couchdb";
|
||||
version = "2.3.1";
|
||||
|
||||
|
||||
# when updating this, please consider bumping the OTP version
|
||||
# in all-packages.nix
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
|
||||
sha256 = "0z926hjqyhxhyr65kqxwpmp80nyfqbig6d9dy8dqflpb87n8rss3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ erlang icu openssl spidermonkey_1_8_5 (python3.withPackages(ps: with ps; [ requests ]))];
|
||||
|
||||
patches = [ ./jsapi.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace src/couch/rebar.config.script --replace '-DHAVE_CURL -I/usr/local/include' "-DHAVE_CURL -I/usr/local/include $NIX_CFLAGS_COMPILE"
|
||||
|
||||
patch bin/rebar <<EOF
|
||||
1c1
|
||||
< #!/usr/bin/env escript
|
||||
---
|
||||
> #!${coreutils}/bin/env escript
|
||||
EOF
|
||||
|
||||
'';
|
||||
|
||||
# Configure a username. The build system would use "couchdb" as
|
||||
# default if none is provided. Note that it is unclear where this
|
||||
# username is actually used in the build, as any choice seems to be
|
||||
# working.
|
||||
configurePhase = ''
|
||||
./configure -u nobody
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make release
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r rel/couchdb/* $out
|
||||
wrapProgram $out/bin/couchdb --suffix PATH : ${bash}/bin
|
||||
'';
|
||||
|
||||
meta = with 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; [ ];
|
||||
};
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
diff -ru couch_js/http.c couch_js-patched/http.c
|
||||
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c 2016-09-12 11:28:51.000000000 +0200
|
||||
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/http.c 2017-02-10 10:52:33.025854045 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <jsapi.h>
|
||||
+#include <js/jsapi.h>
|
||||
#include "config.h"
|
||||
#include "utf8.h"
|
||||
#include "util.h"
|
||||
diff -ru couch_js/main.c couch_js-patched/main.c
|
||||
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/main.c 2016-09-12 11:28:51.000000000 +0200
|
||||
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/main.c 2017-02-10 10:52:33.001854154 +0100
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
-#include <jsapi.h>
|
||||
+#include <js/jsapi.h>
|
||||
#include "config.h"
|
||||
#include "http.h"
|
||||
#include "utf8.h"
|
||||
diff -ru couch_js/utf8.c couch_js-patched/utf8.c
|
||||
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/utf8.c 2016-09-12 11:28:51.000000000 +0200
|
||||
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/utf8.c 2017-02-10 10:52:33.009854117 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
// License for the specific language governing permissions and limitations under
|
||||
// the License.
|
||||
|
||||
-#include <jsapi.h>
|
||||
+#include <js/jsapi.h>
|
||||
#include "config.h"
|
||||
|
||||
static int
|
||||
diff -ru couch_js/util.c couch_js-patched/util.c
|
||||
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.c 2016-09-12 11:28:51.000000000 +0200
|
||||
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.c 2017-02-10 10:52:33.017854081 +0100
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#include <jsapi.h>
|
||||
+#include <js/jsapi.h>
|
||||
|
||||
#include "help.h"
|
||||
#include "util.h"
|
||||
diff -ru couch_js/util.h couch_js-patched/util.h
|
||||
--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.h 2016-09-12 11:28:51.000000000 +0200
|
||||
+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.h 2017-02-10 10:52:32.988854212 +0100
|
||||
@@ -13,7 +13,7 @@
|
||||
#ifndef COUCHJS_UTIL_H
|
||||
#define COUCHJS_UTIL_H
|
||||
|
||||
-#include <jsapi.h>
|
||||
+#include <js/jsapi.h>
|
||||
|
||||
typedef struct {
|
||||
int no_eval;
|
|
@ -120,7 +120,8 @@ mapAliases ({
|
|||
conntrack_tools = conntrack-tools; # added 2018-05
|
||||
cool-old-term = cool-retro-term; # added 2015-01-31
|
||||
coprthr = throw "coprthr has been removed."; # added 2019-12-08
|
||||
couchdb = throw "couchdb was removed from nixpkgs, use couchdb2 or couchdb3 instead"; # added 2021-03-03
|
||||
couchdb = throw "couchdb was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
|
||||
couchdb2 = throw "couchdb2 was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
|
||||
corebird = throw "corebird was deprecated 2019-10-02: See https://www.patreon.com/posts/corebirds-future-18921328. Please use Cawbird as replacement.";
|
||||
coredumper = throw "coredumper has been removed: abandoned by upstream."; # added 2019-11-16
|
||||
cpp_ethereum = throw "cpp_ethereum has been removed; abandoned upstream."; # added 2020-11-30
|
||||
|
|
|
@ -18542,10 +18542,6 @@ in
|
|||
|
||||
clickhouse-cli = with python3Packages; toPythonApplication clickhouse-cli;
|
||||
|
||||
couchdb2 = callPackage ../servers/http/couchdb/2.0.0.nix {
|
||||
erlang = erlangR21;
|
||||
};
|
||||
|
||||
couchdb3 = callPackage ../servers/http/couchdb/3.nix {
|
||||
erlang = erlangR22;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue