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
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
django,
|
|
fetchFromGitHub,
|
|
icalendar,
|
|
pytestCheckHook,
|
|
pytest-django,
|
|
python-dateutil,
|
|
pytz,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-scheduler";
|
|
version = "0.10.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "llazzaro";
|
|
repo = "django-scheduler";
|
|
tag = version;
|
|
hash = "sha256-dY2TPo15RRWrv7LheUNJSQl4d/HeptSMM/wQirRSI5w=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
django
|
|
icalendar
|
|
python-dateutil
|
|
pytz
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-django
|
|
];
|
|
|
|
preCheck = ''
|
|
export DJANGO_SETTINGS_MODULE=tests.settings
|
|
'';
|
|
|
|
patches = [
|
|
# Remove in Django 5.1
|
|
# https://github.com/llazzaro/django-scheduler/pull/567
|
|
./index_together.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
# Remove in Django 5.1
|
|
substituteInPlace tests/settings.py \
|
|
--replace-fail "SHA1PasswordHasher" "PBKDF2PasswordHasher"
|
|
'';
|
|
|
|
disabledTests = lib.optionals (lib.versionAtLeast django.version "5.1") [
|
|
# test_delete_event_authenticated_user - AssertionError: 302 != 200
|
|
"test_delete_event_authenticated_user"
|
|
"test_event_creation_authenticated_user"
|
|
];
|
|
|
|
pythonImportsCheck = [ "schedule" ];
|
|
|
|
meta = {
|
|
description = "Calendar app for Django";
|
|
homepage = "https://github.com/llazzaro/django-scheduler";
|
|
changelog = "https://github.com/llazzaro/django-scheduler/releases/tag/${version}";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ derdennisop ];
|
|
};
|
|
}
|