-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python3Packages.django-filingcabinet: init at 0-unstable-2024-09-09
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
pkgs/development/python-modules/django-filingcabinet/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
django, | ||
pytestCheckHook, | ||
setuptools, | ||
celery, | ||
django-taggit, | ||
feedgen, | ||
reportlab, | ||
jsonschema, | ||
wand, | ||
django-filter, | ||
django-treebeard, | ||
djangorestframework, | ||
pikepdf, | ||
pypdf, | ||
pycryptodome, | ||
python-poppler, | ||
zipstream-ng, | ||
django-json-widget, | ||
factory-boy, | ||
pytest-django, | ||
camelot, | ||
pytesseract, | ||
pytest-factoryboy, | ||
poppler_utils, | ||
pytest-playwright, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "django-filingcabinet"; | ||
version = "0-unstable-2024-09-09"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "okfde"; | ||
repo = "django-filingcabinet"; | ||
# No release tagged yet on GitHub | ||
# https://github.com/okfde/django-filingcabinet/issues/69 | ||
rev = "3b1dc92d89da48af9851e37a22ac1310922b9c73"; | ||
hash = "sha256-Ad2R9Tw6LmwIUMve2pmofKCAbsR/u4Exh92uoztjUaQ="; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace pyproject.toml \ | ||
--replace-fail "zipstream" "zipstream-ng" | ||
''; | ||
|
||
build-system = [ setuptools ]; | ||
|
||
dependencies = [ | ||
celery | ||
django | ||
django-filter | ||
django-json-widget | ||
django-taggit | ||
django-treebeard | ||
djangorestframework | ||
feedgen | ||
jsonschema | ||
pikepdf | ||
pycryptodome | ||
pypdf | ||
python-poppler | ||
reportlab | ||
wand | ||
zipstream-ng | ||
]; | ||
|
||
optional-dependencies = { | ||
tabledetection = [ camelot ]; | ||
ocr = [ pytesseract ]; | ||
# Dependencies not yet packaged | ||
#webp = [ webp ]; | ||
#annotate = [ fcdocs-annotate ]; | ||
}; | ||
|
||
nativeCheckInputs = [ | ||
poppler_utils | ||
pytest-django | ||
pytest-factoryboy | ||
pytest-playwright | ||
pytestCheckHook | ||
]; | ||
|
||
disabledTests = [ | ||
# playwright._impl._errors.Error: BrowserType.launch: Executable doesn't exist at /homeless-shelter/.cache/ms-playwright/chromium-1134/chrome-linux/chrome | ||
"test_document_viewer" | ||
"test_keyboard_scroll" | ||
"test_number_input_scroll" | ||
"test_sidebar_hide" | ||
"test_show_search_bar" | ||
"test_document_viewer_load_images_progressively" | ||
]; | ||
|
||
preCheck = '' | ||
export DJANGO_SETTINGS_MODULE="test_project.settings" | ||
''; | ||
|
||
pythonImportCheck = [ "filingcabinet" ]; | ||
|
||
meta = { | ||
description = "Django app that manages documents with pages, annotations and collections"; | ||
homepage = "https://github.com/okfde/django-filingcabinet"; | ||
license = lib.licenses.mit; | ||
maintainers = [ lib.maintainers.onny ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters