From 77449a077a2d65f6ff16fed28f2caca8fc4761b9 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Fri, 15 Jul 2022 19:42:04 +0200 Subject: [PATCH] couchdb: fix eval for cross-compilation Use erlangR22 for the build platform. Requires buildPackages in top-level due to no splicing at that level. --- pkgs/servers/http/couchdb/3.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/couchdb/3.nix b/pkgs/servers/http/couchdb/3.nix index 7f02d5fb858c..cea02e1b01bf 100644 --- a/pkgs/servers/http/couchdb/3.nix +++ b/pkgs/servers/http/couchdb/3.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, erlang, icu, openssl, spidermonkey_91 -, coreutils, bash, makeWrapper, python3, nixosTests }: +, coreutils, bash, python3, nixosTests }: stdenv.mkDerivation rec { pname = "couchdb"; @@ -13,7 +13,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-acn9b4ATNVf2igLpLdpypP1kbWRvQp9Fu4Mpow+C8g4="; }; - buildInputs = [ erlang icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; + nativeBuildInputs = [ + erlang + ]; + buildInputs = [ icu openssl spidermonkey_91 (python3.withPackages(ps: with ps; [ requests ]))]; postPatch = '' substituteInPlace src/couch/rebar.config.script --replace '/usr/include/mozjs-91' "${spidermonkey_91.dev}/include/mozjs-91" patchShebangs bin/rebar diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d02ad441b1c8..8bb23c141b9e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22332,7 +22332,7 @@ with pkgs; codeowners = callPackage ../development/tools/codeowners { }; couchdb3 = callPackage ../servers/http/couchdb/3.nix { - erlang = erlangR22; + erlang = buildPackages.erlangR22; }; dcnnt = python3Packages.callPackage ../servers/dcnnt { };