mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
froide: init at 0-unstable-2024-11-22 (#355835)
This commit is contained in:
commit
ff04c2da50
19
pkgs/by-name/fr/froide/django_42_storages.patch
Normal file
19
pkgs/by-name/fr/froide/django_42_storages.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff --git a/froide/settings.py b/froide/settings.py
|
||||
index 428349cb..1e1bd7a8 100644
|
||||
--- a/froide/settings.py
|
||||
+++ b/froide/settings.py
|
||||
@@ -867,9 +867,11 @@ class Production(Base):
|
||||
|
||||
ALLOWED_HOSTS = values.TupleValue(("example.com",))
|
||||
CELERY_TASK_ALWAYS_EAGER = values.BooleanValue(False)
|
||||
- STATICFILES_STORAGE = (
|
||||
- "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
|
||||
- )
|
||||
+ STORAGES = {
|
||||
+ 'staticfiles': {
|
||||
+ 'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage',
|
||||
+ },
|
||||
+ }
|
||||
|
||||
|
||||
class SSLSite(object):
|
174
pkgs/by-name/fr/froide/package.nix
Normal file
174
pkgs/by-name/fr/froide/package.nix
Normal file
@ -0,0 +1,174 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
gdal,
|
||||
geos,
|
||||
pnpm,
|
||||
nodejs,
|
||||
postgresql,
|
||||
postgresqlTestHook,
|
||||
playwright-driver,
|
||||
}:
|
||||
let
|
||||
|
||||
python = python3Packages.python.override {
|
||||
packageOverrides = self: super: { django = super.django.override { withGdal = true; }; };
|
||||
};
|
||||
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "froide";
|
||||
version = "0-unstable-2024-11-22";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "okfde";
|
||||
repo = "froide";
|
||||
rev = "a90f5c4d40b46a161111eefdc84e5214e85715b0";
|
||||
hash = "sha256-Q+iNI3yqxqAtDONHY+SaZeMyjY6hqTxwy7YmiiY94+0=";
|
||||
};
|
||||
|
||||
patches = [ ./django_42_storages.patch ];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"pikepdf"
|
||||
"channels"
|
||||
];
|
||||
|
||||
build-system = [ python.pkgs.setuptools ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
nodejs
|
||||
pnpm.configHook
|
||||
];
|
||||
|
||||
dependencies = with python.pkgs; [
|
||||
bleach
|
||||
celery
|
||||
celery-singleton
|
||||
channels
|
||||
coreapi
|
||||
dj-database-url
|
||||
django
|
||||
django-celery-beat
|
||||
django-celery-email
|
||||
django-configurations
|
||||
django-contrib-comments
|
||||
django-crossdomainmedia
|
||||
django-elasticsearch-dsl
|
||||
django-filingcabinet
|
||||
django-filter
|
||||
# Project discontinued upstream
|
||||
# https://github.com/okfde/froide/issues/893
|
||||
django-fsm
|
||||
django-json-widget
|
||||
django-leaflet
|
||||
django-mfa3
|
||||
django-oauth-toolkit
|
||||
django-parler
|
||||
django-storages
|
||||
django-taggit
|
||||
django-treebeard
|
||||
djangorestframework
|
||||
djangorestframework-csv
|
||||
djangorestframework-jsonp
|
||||
drf-spectacular
|
||||
drf-spectacular-sidecar
|
||||
easy-thumbnails
|
||||
elasticsearch
|
||||
elasticsearch-dsl
|
||||
geoip2
|
||||
icalendar
|
||||
markdown
|
||||
phonenumbers
|
||||
pillow
|
||||
pikepdf
|
||||
psycopg
|
||||
pygtail
|
||||
pyisemail
|
||||
pypdf
|
||||
python-magic
|
||||
python-mimeparse
|
||||
python-slugify
|
||||
requests
|
||||
wand
|
||||
weasyprint
|
||||
websockets
|
||||
];
|
||||
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit pname version src;
|
||||
hash = "sha256-DMoaXNm5S64XBERHFnFM6IKBkzXRGDEYWSTruccK9Hc=";
|
||||
};
|
||||
|
||||
postBuild = ''
|
||||
pnpm run build
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp -r build manage.py $out/${python.sitePackages}/froide/
|
||||
makeWrapper $out/${python.sitePackages}/froide/manage.py $out/bin/froide \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--set GDAL_LIBRARY_PATH "${gdal}/lib/libgdal.so" \
|
||||
--set GEOS_LIBRARY_PATH "${geos}/lib/libgeos_c.so"
|
||||
'';
|
||||
|
||||
nativeCheckInputs = with python.pkgs; [
|
||||
(postgresql.withPackages (p: [ p.postgis ]))
|
||||
postgresqlTestHook
|
||||
pytest-django
|
||||
pytest-playwright
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkInputs = with python.pkgs; [
|
||||
beautifulsoup4
|
||||
pytest-factoryboy
|
||||
time-machine
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Requires network connection: elastic_transport.ConnectionError
|
||||
"test_search_similar"
|
||||
"test_search"
|
||||
"test_list_requests"
|
||||
"test_list_jurisdiction_requests"
|
||||
"test_tagged_requests"
|
||||
"test_publicbody_requests"
|
||||
"test_feed"
|
||||
"test_request_list_filter_pagination"
|
||||
"test_request_list_path_filter"
|
||||
"test_web_page"
|
||||
"test_autocomplete"
|
||||
"test_list_no_identical"
|
||||
"test_set_status"
|
||||
"test_make_not_logged_in_request"
|
||||
"test_make_logged_in_request"
|
||||
# TypeError: Pygtail.with_offsets() got an unexpected keyword argument
|
||||
"test_email_signal"
|
||||
"test_pygtail_log_append"
|
||||
"test_bouncing_email"
|
||||
"test_multiple_partial"
|
||||
"test_logfile_rotation"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export PGUSER="froide"
|
||||
export postgresqlEnableTCP=1
|
||||
export postgresqlTestUserOptions="LOGIN SUPERUSER"
|
||||
export GDAL_LIBRARY_PATH="${gdal}/lib/libgdal.so"
|
||||
export GEOS_LIBRARY_PATH="${geos}/lib/libgeos_c.so"
|
||||
export PLAYWRIGHT_BROWSERS_PATH="${playwright-driver.browsers}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Freedom of Information Portal";
|
||||
homepage = "https://github.com/okfde/froide";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.onny ];
|
||||
mainProgram = "froide";
|
||||
};
|
||||
}
|
42
pkgs/development/python-modules/django-fsm/default.nix
Normal file
42
pkgs/development/python-modules/django-fsm/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
django,
|
||||
python3,
|
||||
django-guardian,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-fsm";
|
||||
version = "3.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "viewflow";
|
||||
repo = "django-fsm";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-woN0F4hTaPk8HTGNT6zQlZDJ9SCVRut9maKSlDmalUE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [ django ];
|
||||
|
||||
checkInputs = [ django-guardian ];
|
||||
|
||||
checkPhase = ''
|
||||
${python3.interpreter} tests/manage.py test
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "django_fsm" ];
|
||||
|
||||
meta = {
|
||||
description = "Django friendly finite state machine support";
|
||||
homepage = "https://github.com/viewflow/django-fsm";
|
||||
license = lib.licenses.mit;
|
||||
knownVulnerabilities = [ "Package is marked as discontinued upstream." ];
|
||||
maintainers = [ lib.maintainers.onny ];
|
||||
};
|
||||
}
|
@ -3454,6 +3454,8 @@ self: super: with self; {
|
||||
|
||||
django-formset-js-improved = callPackage ../development/python-modules/django-formset-js-improved { };
|
||||
|
||||
django-fsm = callPackage ../development/python-modules/django-fsm { };
|
||||
|
||||
django-graphiql-debug-toolbar = callPackage ../development/python-modules/django-graphiql-debug-toolbar { };
|
||||
|
||||
django-gravatar2 = callPackage ../development/python-modules/django-gravatar2 { };
|
||||
@ -4906,6 +4908,8 @@ self: super: with self; {
|
||||
|
||||
fritzconnection = callPackage ../development/python-modules/fritzconnection { };
|
||||
|
||||
froide = toPythonModule (pkgs.froide.override { python3Packages = self; });
|
||||
|
||||
frozendict = callPackage ../development/python-modules/frozendict { };
|
||||
|
||||
frozenlist = callPackage ../development/python-modules/frozenlist { };
|
||||
|
Loading…
Reference in New Issue
Block a user