mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
mongodb: new package (nosql database) - nixos integration available
svn path=/nixpkgs/trunk/; revision=31655
This commit is contained in:
parent
e58052514b
commit
8985708131
44
pkgs/servers/nosql/mongodb/default.nix
Normal file
44
pkgs/servers/nosql/mongodb/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, fetchurl, scons, which, boost, gnutar, v8 ? null, useV8 ? false}:
|
||||
|
||||
assert useV8 -> v8 != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mongodb-2.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://downloads.mongodb.org/src/mongodb-src-r2.0.2.tar.gz";
|
||||
sha256 = "13xcwaz9rqn0xgh5jijpqxhz1q2qjl8x18bymbl7092k6p29i974";
|
||||
};
|
||||
|
||||
buildInputs = [scons which boost] ++ stdenv.lib.optional useV8 v8;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace SConstruct --replace "Environment( MSVS_ARCH=msarch , tools = [\"default\", \"gch\"], toolpath = '.' )" "Environment( MSVS_ARCH=msarch , tools = [\"default\", \"gch\"], toolpath = '.', ENV = os.environ )"
|
||||
substituteInPlace SConstruct --replace "../v8" "${v8}"
|
||||
substituteInPlace SConstruct --replace "LIBPATH=[\"${v8}/\"]" "LIBPATH=[\"${v8}/lib\"]"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export TERM=""
|
||||
scons all --cc=`which gcc` --cxx=`which g++` --libpath=${boost}/lib --cpppath=${boost}/include ${if useV8 then "--usev8" else ""}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
scons install --cc=`which gcc` --cxx=`which g++` --libpath=${boost}/lib --cpppath=${boost}/include --full --prefix=$out
|
||||
if [ -d $out/lib64 ]; then
|
||||
mv $out/lib64 $out/lib
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "a scalable, high-performance, open source NoSQL database";
|
||||
homepage = http://www.mongodb.org;
|
||||
license = "AGPLv3";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.bluescreen303 ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -5061,6 +5061,8 @@ let
|
||||
|
||||
monetdb = callPackage ../servers/sql/monetdb { };
|
||||
|
||||
mongodb = callPackage ../servers/nosql/mongodb { useV8 = (getConfig ["mongodb" "useV8"] false); };
|
||||
|
||||
mysql4 = import ../servers/sql/mysql {
|
||||
inherit fetchurl stdenv ncurses zlib perl;
|
||||
ps = procps; /* !!! Linux only */
|
||||
|
Loading…
Reference in New Issue
Block a user