1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
80 lines
1.8 KiB
Nix
80 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
azure-storage-blob,
|
|
boto3,
|
|
buildPythonPackage,
|
|
cryptography,
|
|
django,
|
|
dropbox,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
google-cloud-storage,
|
|
libcloud,
|
|
moto,
|
|
paramiko,
|
|
pynacl,
|
|
pytestCheckHook,
|
|
rsa,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-storages";
|
|
version = "1.14.6";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jschneier";
|
|
repo = "django-storages";
|
|
tag = version;
|
|
hash = "sha256-br7JGPf5EAAl0Qg7b+XaksxNPCTJsSS8HLgvA0wZmeI=";
|
|
};
|
|
|
|
patches = [
|
|
# Add Moto 5 support
|
|
# https://github.com/jschneier/django-storages/pull/1464
|
|
(fetchpatch {
|
|
url = "https://github.com/jschneier/django-storages/commit/e1aedcf2d137f164101d31f2f430f1594eedd78c.patch";
|
|
hash = "sha256-jSb/uJ0RXvPsXl+WUAzAgDvJl9Y3ad2F30X1SbsCc04=";
|
|
name = "add_moto_5_support.patch";
|
|
})
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ django ];
|
|
|
|
optional-dependencies = {
|
|
azure = [ azure-storage-blob ];
|
|
boto3 = [ boto3 ];
|
|
dropbox = [ dropbox ];
|
|
google = [ google-cloud-storage ];
|
|
libcloud = [ libcloud ];
|
|
s3 = [ boto3 ];
|
|
sftp = [ paramiko ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
cryptography
|
|
moto
|
|
pytestCheckHook
|
|
rsa
|
|
]
|
|
++ lib.concatAttrValues optional-dependencies;
|
|
|
|
checkInputs = [ pynacl ];
|
|
|
|
pythonImportsCheck = [ "storages" ];
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
meta = {
|
|
description = "Collection of custom storage backends for Django";
|
|
changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst";
|
|
downloadPage = "https://github.com/jschneier/django-storages/";
|
|
homepage = "https://django-storages.readthedocs.io";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ mmai ];
|
|
};
|
|
}
|