Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

97 lines
2.1 KiB
Nix

{
lib,
python3,
fetchPypi,
nixosTests,
defaultSpecificationFile ? null,
}:
let
python = python3;
in
python.pkgs.buildPythonApplication rec {
pname = "open-web-calendar";
version = "1.49";
pyproject = true;
disabled = python.pythonOlder "3.9";
src = fetchPypi {
inherit version;
pname = "open_web_calendar";
hash = "sha256-vtmIqiF85zn8CiMUWsCKJUzfiiK/j+xlZIyuIMGxR4I=";
};
# The Pypi tarball doesn't contain open_web_calendars/features
postPatch = ''
ln -s $PWD/features open_web_calendar/features
'';
postInstall = lib.optionalString (defaultSpecificationFile != null) ''
install -D ${defaultSpecificationFile} $out/$defaultSpecificationPath
'';
build-system = with python.pkgs; [
hatchling
hatch-vcs
hatch-requirements-txt
];
dependencies =
with python.pkgs;
[
flask-caching
flask-allowed-hosts
flask
icalendar
icalendar-compatibility
cryptography
bcrypt
caldav
requests
pyyaml
recurring-ical-events
gunicorn
lxml
beautifulsoup4
lxml-html-clean
pytz
mergecal
]
++ requests.optional-dependencies.socks;
nativeCheckInputs = with python.pkgs; [ pytestCheckHook ];
enabledTestPaths = [ "open_web_calendar/test" ];
pythonImportsCheck = [ "open_web_calendar.app" ];
defaultSpecificationPath = "${python.sitePackages}/open_web_calendar/default_specification.yml";
passthru = {
inherit python;
tests = {
inherit (nixosTests) open-web-calendar;
};
};
meta = with lib; {
description = "Highly customizable web calendar that can be embedded into websites using ICal source links";
homepage = "https://open-web-calendar.quelltext.eu";
changelog =
let
v = builtins.replaceStrings [ "." ] [ "" ] version;
in
"https://open-web-calendar.quelltext.eu/changelog/#v${v}";
license = with licenses; [
gpl2Only
cc-by-sa-40
cc0
];
platforms = platforms.linux;
maintainers = with maintainers; [ erictapen ];
mainProgram = "open-web-calendar";
};
}