git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #117094 from helsinki-systems/drop/spidermonkey_1_8_5

spidermonkey_1_8_5: drop

commitcd609e7a1c48e324c1779a6845ef0f7e6face24e authorajs124 <ajs124@users.noreply.github.com> dateFri 7 May 2021, 18:55 (6 years ago) parent5186e9609d29bd
8 files changed+8−297
nixos/modules/services/databases/couchdb.nix+5−14 nixos/tests/couchdb.nix−38 pkgs/development/interpreters/spidermonkey/1.8.5.nix−79 pkgs/servers/http/couchdb/2.0.0.nix−57 pkgs/servers/http/couchdb/default.nix−39 pkgs/servers/http/couchdb/jsapi.patch−60 pkgs/top-level/aliases.nix+3 pkgs/top-level/all-packages.nix−10
nixos/modules/services/databases/couchdb.nix+5−14
@@ -4,24 +4,17 @@ with lib;
44
55let
66 cfg = config.services.couchdb;
7− useVersion2 = strings.versionAtLeast (strings.getVersion cfg.package) "2.0";
87 configFile = pkgs.writeText "couchdb.ini" (
98 ''
109 [couchdb]
1110 database_dir = ${cfg.databaseDir}
1211 uri_file = ${cfg.uriFile}
1312 view_index_dir = ${cfg.viewIndexDir}
14− '' + (if cfg.adminPass != null then
15− ''
13+ '' + (optionalString (cfg.adminPass != null) ''
1614 [admins]
1715 ${cfg.adminUser} = ${cfg.adminPass}
18− '' else
19− "") + (if useVersion2 then
20− ''
16+ '' + ''
2117 [chttpd]
22− '' else
23− ''
24− [httpd]
2518 '') +
2619 ''
2720 port = ${toString cfg.port}
@@ -30,8 +23,7 @@ let
3023 [log]
3124 file = ${cfg.logFile}
3225 '');
33− executable = if useVersion2 then "${cfg.package}/bin/couchdb"
34− else ''${cfg.package}/bin/couchdb -a ${configFile} -a ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} -a ${cfg.configFile}'';
26+ executable = "${cfg.package}/bin/couchdb";
3527
3628in {
3729
@@ -177,8 +169,7 @@ in {
177169
178170 environment.systemPackages = [ cfg.package ];
179171
180− services.couchdb.configFile = mkDefault
181− (if useVersion2 then "/var/lib/couchdb/local.ini" else "/var/lib/couchdb/couchdb.ini");
172+ services.couchdb.configFile = mkDefault "/var/lib/couchdb/local.ini";
182173
183174 systemd.tmpfiles.rules = [
184175 "d '${dirOf cfg.uriFile}' - ${cfg.user} ${cfg.group} - -"
@@ -195,7 +186,7 @@ in {
195186 touch ${cfg.configFile}
196187 '';
197188
198− environment = mkIf useVersion2 {
189+ environment = {
199190 # we are actually specifying 4 configuration files:
200191 # 1. the preinstalled default.ini
201192 # 2. the module configuration
nixos/tests/couchdb.nix−38
@@ -24,8 +24,6 @@ with lib;
2424 };
2525
2626 nodes = {
27− couchdb1 = makeNode pkgs.couchdb testuser testpass;
28− couchdb2 = makeNode pkgs.couchdb2 testuser testpass;
2927 couchdb3 = makeNode pkgs.couchdb3 testuser testpass;
3028 };
3129
@@ -41,42 +39,6 @@ with lib;
4139 in ''
4240 start_all()
4341
44− couchdb1.wait_for_unit("couchdb.service")
45− couchdb1.wait_until_succeeds(
46− "${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
47− )
48− couchdb1.wait_until_succeeds(
49− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
50− )
51− couchdb1.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
52− couchdb1.succeed(
53− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "3"}"
54− )
55− couchdb1.succeed(
56− "${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
57− )
58− couchdb1.succeed(
59− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "2"}"
60− )
61−
62− couchdb2.wait_for_unit("couchdb.service")
63− couchdb2.wait_until_succeeds(
64− "${curlJqCheck "" "GET" "" ".couchdb" "Welcome"}"
65− )
66− couchdb2.wait_until_succeeds(
67− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
68− )
69− couchdb2.succeed("${curlJqCheck testlogin "PUT" "foo" ".ok" "true"}")
70− couchdb2.succeed(
71− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "1"}"
72− )
73− couchdb2.succeed(
74− "${curlJqCheck testlogin "DELETE" "foo" ".ok" "true"}"
75− )
76− couchdb2.succeed(
77− "${curlJqCheck "" "GET" "_all_dbs" ". | length" "0"}"
78− )
79−
8042 couchdb3.wait_for_unit("couchdb.service")
8143 couchdb3.wait_until_succeeds(
8244 "${curlJqCheck testlogin "GET" "" ".couchdb" "Welcome"}"
pkgs/development/interpreters/spidermonkey/1.8.5.nixdeleted−79
@@ -1,79 +0,0 @@
1−{ stdenv, lib, autoconf213, fetchurl, fetchpatch, pkg-config, nspr, perl, python2, zip }:
2−
3−stdenv.mkDerivation {
4− pname = "spidermonkey";
5− version = "1.8.5";
6−
7− src = fetchurl {
8− url = "mirror://mozilla/js/js185-1.0.0.tar.gz";
9− sha256 = "5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687";
10− };
11−
12− propagatedBuildInputs = [ nspr ];
13−
14− nativeBuildInputs = [ pkg-config ] ++ lib.optional stdenv.isAarch32 autoconf213;
15− buildInputs = [ perl python2 zip ];
16−
17− postUnpack = "sourceRoot=\${sourceRoot}/js/src";
18−
19− preConfigure = ''
20− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr"
21− export LIBXUL_DIST=$out
22− ${lib.optionalString stdenv.isAarch32 "autoreconf --verbose --force"}
23− '';
24−
25− patches = [
26− (fetchpatch {
27− name = "gcc6.patch";
28− url = "https://sources.debian.org/data/main/m/mozjs/1.8.5-1.0.0+dfsg-6/debian/patches/fix-811665.patch";
29− sha256 = "1q8477xqxiy5d8376k5902l45gd0qkd4nxmhl8vr6rr1pxfcny99";
30− })
31− ] ++ lib.optionals stdenv.isAarch32 [
32− # Explained below in configureFlags for ARM
33− ./1.8.5-findvanilla.patch
34− # Fix for hard float flags.
35− ./1.8.5-arm-flags.patch
36− ];
37−
38− patchFlags = [ "-p3" ];
39−
40− # fixes build on gcc8
41− postPatch = ''
42− substituteInPlace ./methodjit/MethodJIT.cpp \
43− --replace 'asm volatile' 'asm'
44− '';
45−
46− # On the Sheevaplug, ARM, its nanojit thing segfaults in japi-tests in
47− # "make check". Disabling tracejit makes it work, but then it needs the
48− # patch findvanilla.patch do disable a checker about allocator safety. In case
49− # of polkit, which is what matters most, it does not override the allocator
50− # so the failure of that test does not matter much.
51− configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ] ++
52− lib.optionals (stdenv.hostPlatform.system == "armv5tel-linux") [
53− "--with-cpu-arch=armv5t"
54− "--disable-tracejit" ];
55−
56− # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393
57− preBuild = ''
58− touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}
59− ${if stdenv.isAarch32 then "rm -r jit-test/tests/jaeger/bug563000" else ""}
60− '';
61−
62− enableParallelBuilding = true;
63−
64− doCheck = true;
65−
66− preCheck = ''
67− rm jit-test/tests/sunspider/check-date-format-tofte.js # https://bugzil.la/600522
68− '';
69−
70− meta = with lib; {
71− description = "Mozilla's JavaScript engine written in C/C++";
72− homepage = "https://developer.mozilla.org/en/SpiderMonkey";
73− # TODO: MPL/GPL/LGPL tri-license.
74− maintainers = [ maintainers.goibhniu ];
75− platforms = platforms.linux;
76− broken = stdenv.isAarch64; # 2018-08-21, broken since 2017-03-08
77− };
78−}
79−
pkgs/servers/http/couchdb/2.0.0.nixdeleted−57
@@ -1,57 +0,0 @@
1−{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5
2−, coreutils, bash, makeWrapper, python3 }:
3−
4−stdenv.mkDerivation rec {
5− pname = "couchdb";
6− version = "2.3.1";
7−
8−
9− # when updating this, please consider bumping the OTP version
10− # in all-packages.nix
11− src = fetchurl {
12− url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
13− sha256 = "0z926hjqyhxhyr65kqxwpmp80nyfqbig6d9dy8dqflpb87n8rss3";
14− };
15−
16− nativeBuildInputs = [ makeWrapper ];
17− buildInputs = [ erlang icu openssl spidermonkey_1_8_5 (python3.withPackages(ps: with ps; [ requests ]))];
18−
19− patches = [ ./jsapi.patch ];
20− postPatch = ''
21− substituteInPlace src/couch/rebar.config.script --replace '-DHAVE_CURL -I/usr/local/include' "-DHAVE_CURL -I/usr/local/include $NIX_CFLAGS_COMPILE"
22−
23− patch bin/rebar <<EOF
24− 1c1
25− < #!/usr/bin/env escript
26− ---
27− > #!${coreutils}/bin/env escript
28− EOF
29−
30− '';
31−
32− # Configure a username. The build system would use "couchdb" as
33− # default if none is provided. Note that it is unclear where this
34− # username is actually used in the build, as any choice seems to be
35− # working.
36− configurePhase = ''
37− ./configure -u nobody
38− '';
39−
40− buildPhase = ''
41− make release
42− '';
43−
44− installPhase = ''
45− mkdir -p $out
46− cp -r rel/couchdb/* $out
47− wrapProgram $out/bin/couchdb --suffix PATH : ${bash}/bin
48− '';
49−
50− meta = with lib; {
51− description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
52− homepage = "http://couchdb.apache.org";
53− license = licenses.asl20;
54− platforms = platforms.all;
55− maintainers = with maintainers; [ ];
56− };
57−}
pkgs/servers/http/couchdb/default.nixdeleted−39
@@ -1,39 +0,0 @@
1−{ lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_1_8_5, curl, help2man
2−, sphinx, which, file, pkg-config, getopt }:
3−
4−stdenv.mkDerivation rec {
5− pname = "couchdb";
6− version = "1.7.1";
7−
8− src = fetchurl {
9− url = "mirror://apache/couchdb/source/${version}/apache-${pname}-${version}.tar.gz";
10− sha256 = "1b9cbdrmh1i71mrwvhm17v4cf7lckpil1vvq7lpmxyn6zfk0l84i";
11− };
12−
13− nativeBuildInputs = [ help2man which file pkg-config sphinx ];
14− buildInputs = [ erlang icu openssl spidermonkey_1_8_5 curl ];
15−
16− postInstall = ''
17− substituteInPlace $out/bin/couchdb --replace getopt "${getopt}/bin/getopt"
18− '';
19−
20− /*
21− Versions of SpiderMonkey after the js185-1.0.0 release remove the optional
22− enforcement of preventing anonymous functions in a statement context. This
23− will most likely break your existing JavaScript code as well as render all
24− example code invalid.
25−
26− If you wish to ignore this error pass --enable-js-trunk to ./configure.
27− */
28− configureFlags = [
29− "--enable-js-trunk"
30− ];
31−
32− meta = with lib; {
33− description = "A database that uses JSON for documents, JavaScript for MapReduce queries, and regular HTTP for an API";
34− homepage = "http://couchdb.apache.org";
35− license = licenses.asl20;
36− platforms = platforms.all;
37− maintainers = with maintainers; [ ];
38− };
39−}
pkgs/servers/http/couchdb/jsapi.patchdeleted−60
@@ -1,60 +0,0 @@
1−diff -ru couch_js/http.c couch_js-patched/http.c
2−--- apache-couchdb-2.0.0/src/couch/priv/couch_js/http.c 2016-09-12 11:28:51.000000000 +0200
3−+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/http.c 2017-02-10 10:52:33.025854045 +0100
4−@@ -15,7 +15,7 @@
5− #include <string.h>
6− #include <sys/types.h>
7− #include <sys/stat.h>
8−-#include <jsapi.h>
9−+#include <js/jsapi.h>
10− #include "config.h"
11− #include "utf8.h"
12− #include "util.h"
13−diff -ru couch_js/main.c couch_js-patched/main.c
14−--- apache-couchdb-2.0.0/src/couch/priv/couch_js/main.c 2016-09-12 11:28:51.000000000 +0200
15−+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/main.c 2017-02-10 10:52:33.001854154 +0100
16−@@ -20,7 +20,7 @@
17− #include <unistd.h>
18− #endif
19−
20−-#include <jsapi.h>
21−+#include <js/jsapi.h>
22− #include "config.h"
23− #include "http.h"
24− #include "utf8.h"
25−diff -ru couch_js/utf8.c couch_js-patched/utf8.c
26−--- apache-couchdb-2.0.0/src/couch/priv/couch_js/utf8.c 2016-09-12 11:28:51.000000000 +0200
27−+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/utf8.c 2017-02-10 10:52:33.009854117 +0100
28−@@ -10,7 +10,7 @@
29− // License for the specific language governing permissions and limitations under
30− // the License.
31−
32−-#include <jsapi.h>
33−+#include <js/jsapi.h>
34− #include "config.h"
35−
36− static int
37−diff -ru couch_js/util.c couch_js-patched/util.c
38−--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.c 2016-09-12 11:28:51.000000000 +0200
39−+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.c 2017-02-10 10:52:33.017854081 +0100
40−@@ -13,7 +13,7 @@
41− #include <stdlib.h>
42− #include <string.h>
43−
44−-#include <jsapi.h>
45−+#include <js/jsapi.h>
46−
47− #include "help.h"
48− #include "util.h"
49−diff -ru couch_js/util.h couch_js-patched/util.h
50−--- apache-couchdb-2.0.0/src/couch/priv/couch_js/util.h 2016-09-12 11:28:51.000000000 +0200
51−+++ apache-couchdb-2.0.0-patched/src/couch/priv/couch_js/util.h 2017-02-10 10:52:32.988854212 +0100
52−@@ -13,7 +13,7 @@
53− #ifndef COUCHJS_UTIL_H
54− #define COUCHJS_UTIL_H
55−
56−-#include <jsapi.h>
57−+#include <js/jsapi.h>
58−
59− typedef struct {
60− int no_eval;
pkgs/top-level/aliases.nix+3
@@ -121,6 +121,8 @@ mapAliases ({
121121 conntrack_tools = conntrack-tools; # added 2018-05
122122 cool-old-term = cool-retro-term; # added 2015-01-31
123123 coprthr = throw "coprthr has been removed."; # added 2019-12-08
124+ couchdb = throw "couchdb was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
125+ couchdb2 = throw "couchdb2 was removed from nixpkgs, use couchdb3 instead"; # added 2021-03-03
124126 corebird = throw "corebird was deprecated 2019-10-02: See https://www.patreon.com/posts/corebirds-future-18921328. Please use Cawbird as replacement.";
125127 coredumper = throw "coredumper has been removed: abandoned by upstream."; # added 2019-11-16
126128 cpp_ethereum = throw "cpp_ethereum has been removed; abandoned upstream."; # added 2020-11-30
@@ -746,6 +748,7 @@ mapAliases ({
746748 speedtest_cli = speedtest-cli; # added 2015-02-17
747749 spice_gtk = spice-gtk; # added 2018-02-25
748750 spice_protocol = spice-protocol; # added 2018-02-25
751+ spidermonkey_1_8_5 = throw "spidermonkey_1_8_5 has been removed, because it is based on Firefox 4.0 from 2011."; # added 2021-05-03
749752 spidermonkey_38 = throw "spidermonkey_38 has been removed. Please use spidermonkey_78 instead."; # added 2021-03-21
750753 spidermonkey_52 = throw "spidermonkey_52 has been removed. Please use spidermonkey_78 instead."; # added 2019-10-16
751754 spidermonkey_60 = throw "spidermonkey_60 has been removed. Please use spidermonkey_78 instead."; # added 2021-03-21
pkgs/top-level/all-packages.nix−10
@@ -12201,7 +12201,6 @@ in
1220112201
1220212202 sparkleshare = callPackage ../applications/version-management/sparkleshare { };
1220312203
12204− spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
1220512204 spidermonkey_68 = callPackage ../development/interpreters/spidermonkey/68.nix { };
1220612205 spidermonkey_78 = callPackage ../development/interpreters/spidermonkey/78.nix { };
1220712206
@@ -18601,15 +18600,6 @@ in
1860118600
1860218601 clickhouse-cli = with python3Packages; toPythonApplication clickhouse-cli;
1860318602
18604− couchdb = callPackage ../servers/http/couchdb {
18605− sphinx = python27Packages.sphinx;
18606− erlang = erlangR19;
18607− };
18608−
18609− couchdb2 = callPackage ../servers/http/couchdb/2.0.0.nix {
18610− erlang = erlangR21;
18611− };
18612−
1861318603 couchdb3 = callPackage ../servers/http/couchdb/3.nix {
1861418604 erlang = erlangR22;
1861518605 };