2011-03-30 13:51:16 +01:00
|
|
|
{ stdenv, fetchurl, pythonPackages, intltool }:
|
2011-03-29 17:15:08 +01:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2011-02-21 21:53:42 +00:00
|
|
|
|
2011-03-30 13:51:16 +01:00
|
|
|
let version = "2011.1.1"; in
|
2011-02-21 21:53:42 +00:00
|
|
|
|
2011-03-29 17:15:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2011-03-30 13:51:16 +01:00
|
|
|
name = "openstack-compute-${version}";
|
2011-02-21 21:53:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-03-30 13:51:16 +01:00
|
|
|
url = "http://launchpad.net/nova/bexar/${version}/+download/nova-${version}.tar.gz";
|
|
|
|
sha256 = "0xd7cxn60vzhkvjwnj0i6jfcxaggwwyw2pnhl4qnb759q9hvk1b9";
|
2011-02-21 21:53:42 +00:00
|
|
|
};
|
|
|
|
|
2011-03-30 13:51:16 +01:00
|
|
|
pythonPath = with pythonPackages;
|
|
|
|
[ setuptools eventlet greenlet gflags netaddr sqlalchemy carrot routes
|
|
|
|
paste_deploy m2crypto ipy boto twisted sqlalchemy_migrate
|
|
|
|
distutils_extra simplejson readline
|
2011-02-21 21:53:42 +00:00
|
|
|
];
|
|
|
|
|
2011-03-29 17:15:08 +01:00
|
|
|
buildInputs =
|
|
|
|
[ pythonPackages.python
|
|
|
|
pythonPackages.wrapPython
|
2011-03-30 13:51:16 +01:00
|
|
|
intltool
|
2011-03-29 17:15:08 +01:00
|
|
|
] ++ pythonPath;
|
|
|
|
|
2011-02-21 21:53:42 +00:00
|
|
|
preConfigure = "export HOME=$(pwd)";
|
|
|
|
|
|
|
|
buildPhase = "python setup.py build";
|
|
|
|
|
|
|
|
installPhase =
|
2011-03-30 13:51:16 +01:00
|
|
|
''
|
2011-02-21 21:53:42 +00:00
|
|
|
p=$(toPythonPath $out)
|
|
|
|
export PYTHONPATH=$p:$PYTHONPATH
|
|
|
|
mkdir -p $p
|
|
|
|
python setup.py install --prefix=$out
|
2011-03-29 17:15:08 +01:00
|
|
|
|
2011-03-30 13:51:16 +01:00
|
|
|
# Nova doesn't like to be called ".nova-foo-wrapped" because it
|
|
|
|
# computes some stuff from its own argv[0]. So call the wrapped
|
|
|
|
# programs ".nova-foo" by overriding wrapProgram.
|
|
|
|
wrapProgram() {
|
|
|
|
local prog="$1"
|
|
|
|
local hidden="$(dirname "$prog")/.$(basename "$prog")"
|
|
|
|
mv $prog $hidden
|
|
|
|
makeWrapper $hidden $prog "$@"
|
|
|
|
}
|
|
|
|
|
2011-03-29 17:15:08 +01:00
|
|
|
wrapPythonPrograms
|
2011-02-21 21:53:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://nova.openstack.org/;
|
|
|
|
description = "OpenStack Compute (a.k.a. Nova), a cloud computing fabric controller";
|
|
|
|
};
|
|
|
|
}
|