mongodb: Eliminate 'variants' redundancy.
This commit is contained in:
parent
f29d66a77f
commit
f6086df42f
@ -32,14 +32,12 @@ with lib;
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
variants =
|
|
||||||
if versionAtLeast version "6.0"
|
|
||||||
then rec {
|
|
||||||
python = scons.python.withPackages (ps: with ps; [
|
python = scons.python.withPackages (ps: with ps; [
|
||||||
pyyaml
|
pyyaml
|
||||||
cheetah3
|
cheetah3
|
||||||
psutil
|
psutil
|
||||||
setuptools
|
setuptools
|
||||||
|
] ++ lib.optionals (versionAtLeast version "6.0") [
|
||||||
packaging
|
packaging
|
||||||
pymongo
|
pymongo
|
||||||
]);
|
]);
|
||||||
@ -47,20 +45,6 @@ let
|
|||||||
mozjsVersion = "60";
|
mozjsVersion = "60";
|
||||||
mozjsReplace = "defined(HAVE___SINCOS)";
|
mozjsReplace = "defined(HAVE___SINCOS)";
|
||||||
|
|
||||||
}
|
|
||||||
else rec {
|
|
||||||
python = scons.python.withPackages (ps: with ps; [
|
|
||||||
pyyaml
|
|
||||||
cheetah3
|
|
||||||
psutil
|
|
||||||
setuptools
|
|
||||||
]);
|
|
||||||
|
|
||||||
mozjsVersion = "60";
|
|
||||||
mozjsReplace = "defined(HAVE___SINCOS)";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
system-libraries = [
|
system-libraries = [
|
||||||
"boost"
|
"boost"
|
||||||
"pcre"
|
"pcre"
|
||||||
@ -95,7 +79,7 @@ in stdenv.mkDerivation rec {
|
|||||||
openssl
|
openssl
|
||||||
openldap
|
openldap
|
||||||
pcre-cpp
|
pcre-cpp
|
||||||
variants.python
|
python
|
||||||
sasl
|
sasl
|
||||||
snappy
|
snappy
|
||||||
zlib
|
zlib
|
||||||
@ -123,7 +107,7 @@ in stdenv.mkDerivation rec {
|
|||||||
# remove -march overriding, we know better.
|
# remove -march overriding, we know better.
|
||||||
sed -i 's/env.Append.*-march=.*$/pass/' SConstruct
|
sed -i 's/env.Append.*-march=.*$/pass/' SConstruct
|
||||||
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "6.0") ''
|
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "6.0") ''
|
||||||
substituteInPlace src/third_party/mozjs-${variants.mozjsVersion}/extract/js/src/jsmath.cpp --replace '${variants.mozjsReplace}' 0
|
substituteInPlace src/third_party/mozjs-${mozjsVersion}/extract/js/src/jsmath.cpp --replace '${mozjsReplace}' 0
|
||||||
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "3.6") ''
|
'' + lib.optionalString (stdenv.isDarwin && versionOlder version "3.6") ''
|
||||||
substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder
|
substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder
|
||||||
substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder
|
substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder
|
||||||
|
Loading…
Reference in New Issue
Block a user