504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
91 lines
1.6 KiB
Nix
91 lines
1.6 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, boto3
|
|
, cryptography
|
|
, eventlet
|
|
, greenlet
|
|
, iana-etc
|
|
, installShellFiles
|
|
, libredirect
|
|
, lxml
|
|
, mock
|
|
, netifaces
|
|
, pastedeploy
|
|
, pbr
|
|
, pyeclib
|
|
, requests
|
|
, setuptools
|
|
, six
|
|
, stestr
|
|
, swiftclient
|
|
, xattr
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "swift";
|
|
version = "2.32.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-JeDmZx667rG1ARfRBUDTcOWe7u3ZiytZzGQSRp8bpes=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# files requires boto which is incompatible with python 3.9
|
|
rm test/functional/s3api/{__init__.py,s3_test_client.py}
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pbr
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
cryptography
|
|
eventlet
|
|
greenlet
|
|
lxml
|
|
netifaces
|
|
pastedeploy
|
|
pyeclib
|
|
requests
|
|
setuptools
|
|
six
|
|
xattr
|
|
];
|
|
|
|
postInstall = ''
|
|
installManPage doc/manpages/*
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
boto3
|
|
mock
|
|
stestr
|
|
swiftclient
|
|
];
|
|
|
|
# a lot of tests currently fail while establishing a connection
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
echo "nameserver 127.0.0.1" > resolv.conf
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
|
|
export LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
export SWIFT_TEST_CONFIG_FILE=test/sample.conf
|
|
|
|
stestr run
|
|
'';
|
|
|
|
pythonImportsCheck = [ "swift" ];
|
|
|
|
meta = with lib; {
|
|
description = "OpenStack Object Storage";
|
|
homepage = "https://github.com/openstack/swift";
|
|
license = licenses.asl20;
|
|
maintainers = teams.openstack.members;
|
|
};
|
|
}
|