From ad628ab557e87ce981566af5fe162f9aab2fe1b9 Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 9 Sep 2012 17:25:59 +0200 Subject: [PATCH] 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. --- pkgs/servers/nosql/mongodb/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 48a33377e506..ce664972037e 100644 --- a/pkgs/servers/nosql/mongodb/default.nix +++ b/pkgs/servers/nosql/mongodb/default.nix @@ -2,6 +2,12 @@ with stdenv.lib; +let installerPatch = fetchurl { + url = "https://jira.mongodb.org/secure/attachment/18160/SConscript.client.patch"; + sha256 = "0n60fh2r8i7m6g113k0iw4adc8jv2by4ahrd780kxg47kzfgw06a"; + }; + +in stdenv.mkDerivation rec { name = "mongodb-2.2.0"; @@ -12,9 +18,11 @@ stdenv.mkDerivation rec { buildNativeInputs = [ scons which ]; + patches = [ installerPatch ]; + enableParallelBuilding = true; - patchPhase = '' + postPatch = '' substituteInPlace SConstruct --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR" '' + optionalString useV8 '' substituteInPlace SConstruct --replace "#/../v8" "${v8}" \ @@ -37,6 +45,6 @@ stdenv.mkDerivation rec { license = "AGPLv3"; maintainers = [ stdenv.lib.maintainers.bluescreen303 ]; - platforms = stdenv.lib.platforms.all; + platforms = stdenv.lib.platforms.linux; }; }