couchdb: fix eval for cross-compilation

Use erlangR22 for the build platform.
Requires buildPackages in top-level due to no splicing at that level.

authored by Rick van Schijndel and committed by Artturin 77449a07 05876402

+6 -3
+5 -2
pkgs/servers/http/couchdb/3.nix
··· 1 1 { lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_91 2 - , coreutils, bash, makeWrapper, python3, nixosTests }: 2 + , coreutils, bash, python3, nixosTests }: 3 3 4 4 stdenv.mkDerivation rec { 5 5 pname = "couchdb"; ··· 13 13 sha256 = "sha256-acn9b4ATNVf2igLpLdpypP1kbWRvQp9Fu4Mpow+C8g4="; 14 14 }; 15 15 16 - buildInputs = [ erlang icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; 16 + nativeBuildInputs = [ 17 + erlang 18 + ]; 19 + buildInputs = [ icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; 17 20 postPatch = '' 18 21 substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91" 19 22 patchShebangs bin/rebar
+1 -1
pkgs/top-level/all-packages.nix
··· 22332 22332 codeowners = callPackage ../development/tools/codeowners { }; 22333 22333 22334 22334 couchdb3 = callPackage ../servers/http/couchdb/3.nix { 22335 - erlang = erlangR22; 22335 + erlang = buildPackages.erlangR22; 22336 22336 }; 22337 22337 22338 22338 dcnnt = python3Packages.callPackage ../servers/dcnnt { };