From cd20497c66d45df7f986c34f9105338df1de7d41 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sat, 14 Aug 2021 13:39:37 +0200 Subject: [PATCH] mongodb: pick python version from scons The python modules that we to the enviroment should always come from the same python version as scons as otherwise they can't be loaded. This unbreaks the build of mongodb 4.2 which pinned python to 3.8 while our python attribute moved on to 3.9 which is what scons uses now. --- pkgs/servers/nosql/mongodb/mongodb.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/nosql/mongodb/mongodb.nix b/pkgs/servers/nosql/mongodb/mongodb.nix index 8a66528d81cd..7c66d348ffb0 100644 --- a/pkgs/servers/nosql/mongodb/mongodb.nix +++ b/pkgs/servers/nosql/mongodb/mongodb.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, sconsPackages, boost, gperftools, pcre-cpp, snappy, zlib, libyamlcpp -, sasl, openssl, libpcap, python27, python38, curl, Security, CoreFoundation, cctools }: +, sasl, openssl, libpcap, curl, Security, CoreFoundation, cctools }: # Note: # The command line tools are written in Go as part of a different package (mongodb-tools) @@ -12,17 +12,16 @@ with lib; let variants = if versionAtLeast version "4.2" - then { python = python38.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]); + then rec { python = scons.python.withPackages (ps: with ps; [ pyyaml cheetah3 psutil setuptools ]); scons = sconsPackages.scons_latest; mozjsVersion = "60"; mozjsReplace = "defined(HAVE___SINCOS)"; } - else { python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); + else rec { python = scons.python.withPackages (ps: with ps; [ pyyaml typing cheetah ]); scons = sconsPackages.scons_3_1_2; mozjsVersion = "45"; mozjsReplace = "defined(HAVE_SINCOS)"; }; - python = python27.withPackages (ps: with ps; [ pyyaml typing cheetah ]); system-libraries = [ "boost" "pcre"