mongodb: fix build on i686, restrict platforms to linux

mongodb is supposed to work on most unixes but its build system is
quite picky and fragile.
As it hasn't worked for non-linux platforms on NixOS yet, this change
won't affect anyone and will remove the illusion that other platforms
are currently supported.
This commit is contained in:
Mathijs Kwik 2012-09-09 17:25:59 +02:00
parent 071d685dda
commit ad628ab557

View File

@ -2,6 +2,12 @@
with stdenv.lib; with stdenv.lib;
let installerPatch = fetchurl {
url = "https://jira.mongodb.org/secure/attachment/18160/SConscript.client.patch";
sha256 = "0n60fh2r8i7m6g113k0iw4adc8jv2by4ahrd780kxg47kzfgw06a";
};
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mongodb-2.2.0"; name = "mongodb-2.2.0";
@ -12,9 +18,11 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ scons which ]; buildNativeInputs = [ scons which ];
patches = [ installerPatch ];
enableParallelBuilding = true; enableParallelBuilding = true;
patchPhase = '' postPatch = ''
substituteInPlace SConstruct --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR" substituteInPlace SConstruct --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR"
'' + optionalString useV8 '' '' + optionalString useV8 ''
substituteInPlace SConstruct --replace "#/../v8" "${v8}" \ substituteInPlace SConstruct --replace "#/../v8" "${v8}" \
@ -37,6 +45,6 @@ stdenv.mkDerivation rec {
license = "AGPLv3"; license = "AGPLv3";
maintainers = [ stdenv.lib.maintainers.bluescreen303 ]; maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
platforms = stdenv.lib.platforms.all; platforms = stdenv.lib.platforms.linux;
}; };
} }