2013-03-22 20:23:25 +00:00
|
|
|
{ stdenv, fetchurl, scons, which, v8}:
|
2012-01-18 20:32:41 +00:00
|
|
|
|
2012-06-11 17:41:14 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2012-09-09 15:25:59 +00:00
|
|
|
let installerPatch = fetchurl {
|
|
|
|
url = "https://jira.mongodb.org/secure/attachment/18160/SConscript.client.patch";
|
|
|
|
sha256 = "0n60fh2r8i7m6g113k0iw4adc8jv2by4ahrd780kxg47kzfgw06a";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2012-01-18 20:32:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-03-22 20:23:25 +00:00
|
|
|
name = "mongodb-2.4.0";
|
2012-01-18 20:32:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-03-22 20:23:25 +00:00
|
|
|
url = http://downloads.mongodb.org/src/mongodb-src-r2.4.0.tar.gz;
|
|
|
|
sha256 = "115wrw23naxpaiwh8ar6g40f2nsdbz1hdpkp88wbi5yc9m6drg41";
|
2012-01-18 20:32:41 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ scons which ];
|
2012-01-18 20:32:41 +00:00
|
|
|
|
2012-09-09 15:25:59 +00:00
|
|
|
patches = [ installerPatch ];
|
|
|
|
|
2012-01-18 20:32:41 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2012-09-09 15:25:59 +00:00
|
|
|
postPatch = ''
|
2012-09-08 12:50:47 +00:00
|
|
|
substituteInPlace SConstruct --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR"
|
|
|
|
substituteInPlace SConstruct --replace "#/../v8" "${v8}" \
|
|
|
|
--replace "[\"${v8}/\"]" "[\"${v8}/lib\"]"
|
2012-01-18 20:32:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2012-09-08 12:50:47 +00:00
|
|
|
echo $PATH
|
2013-03-22 20:23:25 +00:00
|
|
|
scons all --cc=`which gcc` --cxx=`which g++`
|
2012-01-18 20:32:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2013-03-22 20:23:25 +00:00
|
|
|
scons install --cc=`which gcc` --cxx=`which g++` --full --prefix=$out
|
2012-09-08 12:50:47 +00:00
|
|
|
rm -rf $out/lib64 # exact same files as installed in $out/lib
|
2012-01-18 20:32:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "a scalable, high-performance, open source NoSQL database";
|
|
|
|
homepage = http://www.mongodb.org;
|
|
|
|
license = "AGPLv3";
|
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
|
2012-09-09 15:25:59 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-01-18 20:32:41 +00:00
|
|
|
};
|
|
|
|
}
|