1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/applications/virtualization/openstack/glance.nix
Lancelot SIX 0467a17858 pythonPackages.sqlalchemy: follows upstream, sqlalchemy7 for lecagy
This makes pythonPackages.sqlalchemy the most up to date revision (it
was called sqlalchemy_1_0 before), and maintains the various “legacy”
versions available as pythonPackages.sqlalchemyX for X in {7,8,9}.

All derivations that required `sqlalchemy_1_0` now require `sqlalchemy`
while those that required `sqlalchemy` now require `sqlalchemy7`.

The derivations are not changed, only the attribute names they are
bound to.
2016-02-27 12:11:12 +01:00

71 lines
2.5 KiB
Nix

{ stdenv, fetchurl, pythonPackages, sqlite, which, strace }:
pythonPackages.buildPythonApplication rec {
name = "glance-${version}";
version = "11.0.0";
namePrefix = "";
PBR_VERSION = "${version}";
src = fetchurl {
url = "https://github.com/openstack/glance/archive/${version}.tar.gz";
sha256 = "05rz1lmzdmpnw8sf87vvi0l6q9g6s840z934zyinw17yfcvmqrdg";
};
# https://github.com/openstack/glance/blob/stable/liberty/requirements.txt
propagatedBuildInputs = with pythonPackages; [
pbr sqlalchemy anyjson eventlet PasteDeploy routes webob sqlalchemy_migrate
httplib2 pycrypto iso8601 stevedore futurist keystonemiddleware paste
jsonschema keystoneclient pyopenssl six retrying semantic-version qpid-python
WSME osprofiler glance_store castellan taskflow cryptography xattr pysendfile
# oslo componenets
oslo-config oslo-context oslo-concurrency oslo-service oslo-utils oslo-db
oslo-i18n oslo-log oslo-messaging oslo-middleware oslo-policy oslo-serialization
MySQL_python
];
buildInputs = with pythonPackages; [
Babel coverage fixtures mox3 mock oslosphinx requests2 testrepository pep8
testresources testscenarios testtools psutil_1 oslotest psycopg2
sqlite which strace
];
patchPhase = ''
# it's not a test, but a class mixin
sed -i 's/ImageCacheTestCase/ImageCacheMixin/' glance/tests/unit/test_image_cache.py
# these require network access, see https://bugs.launchpad.net/glance/+bug/1508868
sed -i 's/test_get_image_data_http/noop/' glance/tests/unit/common/scripts/test_scripts_utils.py
sed -i 's/test_set_image_data_http/noop/' glance/tests/unit/common/scripts/image_import/test_main.py
sed -i 's/test_create_image_with_nonexistent_location_url/noop/' glance/tests/unit/v1/test_api.py
sed -i 's/test_upload_image_http_nonexistent_location_url/noop/' glance/tests/unit/v1/test_api.py
# TODO: couldn't figure out why this test is failing
sed -i 's/test_all_task_api/noop/' glance/tests/integration/v2/test_tasks_api.py
'';
postInstall = ''
# check all binaries don't crash
for i in $out/bin/*; do
case "$i" in
*glance-artifacts) # https://bugs.launchpad.net/glance/+bug/1508879
:
;;
*)
$i --help
esac
done
cp etc/*-paste.ini $out/etc/
'';
meta = with stdenv.lib; {
homepage = http://glance.openstack.org/;
description = "Services for discovering, registering, and retrieving virtual machine images";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux;
};
}