116 lines
2.2 KiB
Nix
116 lines
2.2 KiB
Nix
{ lib
|
|
, buildPythonApplication
|
|
, fetchFromGitHub
|
|
, python3Packages
|
|
, gettext
|
|
, libsass
|
|
, pkg-config
|
|
, postgresql
|
|
, uwsgi
|
|
}:
|
|
|
|
buildPythonApplication rec {
|
|
pname = "bitpoll";
|
|
version = "unstable-2024-11-23";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fsinfuhh";
|
|
repo = "Bitpoll";
|
|
rev = "4a3e6a5e3500308a428a6c7644f50d423adca6fc";
|
|
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
gettext
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libsass
|
|
postgresql
|
|
];
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
# Core Django dependencies
|
|
django
|
|
django-auth-ldap
|
|
django-encrypted-model-fields
|
|
django-friendly-tag-loader
|
|
django-markdownify
|
|
django-pipeline
|
|
django-token-bucket
|
|
django-widget-tweaks
|
|
|
|
# Database
|
|
psycopg2
|
|
|
|
# Calendar and date handling
|
|
caldav
|
|
icalendar
|
|
python-dateutil
|
|
pytz
|
|
recurring-ical-events
|
|
x-wr-timezone
|
|
|
|
# Authentication and security
|
|
simple-openid-connect
|
|
cryptography
|
|
cryptojwt
|
|
|
|
# Utilities
|
|
bleach
|
|
furl
|
|
lxml
|
|
markdown
|
|
requests
|
|
sentry-sdk
|
|
|
|
# SASS compilation
|
|
libsasscompiler
|
|
|
|
# Other dependencies
|
|
pydantic
|
|
six
|
|
vobject
|
|
];
|
|
|
|
# Create a setup.py since the project doesn't have one
|
|
preBuild = ''
|
|
cat > setup.py << EOF
|
|
from setuptools import setup, find_packages
|
|
|
|
setup(
|
|
name='bitpoll',
|
|
version='${version}',
|
|
packages=find_packages(),
|
|
include_package_data=True,
|
|
install_requires=[],
|
|
scripts=['manage.py'],
|
|
entry_points={
|
|
'console_scripts': [
|
|
'bitpoll-manage=manage:main',
|
|
],
|
|
},
|
|
)
|
|
EOF
|
|
'';
|
|
|
|
# Compile messages and collect static files
|
|
postBuild = ''
|
|
export DJANGO_SETTINGS_MODULE=bitpoll.settings.production
|
|
python manage.py compilemessages
|
|
python manage.py collectstatic --noinput --clear
|
|
'';
|
|
|
|
# Skip tests for now as they require additional setup
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
description = "A web application for scheduling meetings and general polling";
|
|
homepage = "https://github.com/fsinfuhh/Bitpoll";
|
|
license = licenses.gpl3Only;
|
|
maintainers = [ ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|