From fa49cf159d1130325ac15a191b96e68c2bbc9154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 18 Jul 2024 09:57:50 -0700 Subject: [PATCH 01/12] python312Packages.icalendar: 5.0.13 -> 6.0.0 Diff: https://github.com/collective/icalendar/compare/refs/tags/v5.0.13...v6.0.0 Changelog: https://github.com/collective/icalendar/blob/v6.0.0/CHANGES.rst --- .../python-modules/icalendar/default.nix | 23 ++++++++++++++----- .../icalendar/no-dynamic-version.patch | 17 ++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/python-modules/icalendar/no-dynamic-version.patch diff --git a/pkgs/development/python-modules/icalendar/default.nix b/pkgs/development/python-modules/icalendar/default.nix index 1170485bf39f..e03544ac41d4 100644 --- a/pkgs/development/python-modules/icalendar/default.nix +++ b/pkgs/development/python-modules/icalendar/default.nix @@ -2,17 +2,19 @@ lib, buildPythonPackage, fetchFromGitHub, + replaceVars, pythonOlder, - setuptools, + hatch-vcs, + hatchling, backports-zoneinfo, python-dateutil, - pytz, + tzdata, hypothesis, pytestCheckHook, }: buildPythonPackage rec { - version = "5.0.13"; + version = "6.0.0"; pname = "icalendar"; pyproject = true; @@ -20,14 +22,23 @@ buildPythonPackage rec { owner = "collective"; repo = "icalendar"; rev = "refs/tags/v${version}"; - hash = "sha256-2gpWfLXR4HThw23AWxY2rY9oiK6CF3Qiad8DWHCs4Qk="; + hash = "sha256-eWFDY/pNVfcUk3PfB0vXqh9swuSGtflUw44IMDJI+yI="; }; - build-system = [ setuptools ]; + patches = [ + (replaceVars ./no-dynamic-version.patch { + inherit version; + }) + ]; + + build-system = [ + hatch-vcs + hatchling + ]; dependencies = [ python-dateutil - pytz + tzdata ] ++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/icalendar/no-dynamic-version.patch b/pkgs/development/python-modules/icalendar/no-dynamic-version.patch new file mode 100644 index 000000000000..4754b6441a5f --- /dev/null +++ b/pkgs/development/python-modules/icalendar/no-dynamic-version.patch @@ -0,0 +1,17 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 9730e46..9834686 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -34,11 +34,7 @@ maintainers = [ + { name="Christian Geier" }, + { name="Jaca", email="vitouejj@gmail.com" }, + ] +-# These attributes are dynamically generated by hatch-vcs +-dynamic = [ +- "urls", +- "version" +-] ++version = "@version@" + description = "iCalendar parser/generator" + readme = { file = "README.rst", content-type = "text/x-rst" } + From 562ccf65eae3bb1b24f0c4787a7f13eb7e3b0db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 29 Sep 2024 22:42:30 -0700 Subject: [PATCH 02/12] python312Packages.x-wr-timezone: 0.0.7 -> 1.0.1 Diff: https://github.com/niccokunzmann/x-wr-timezone/compare/v0.0.7...v1.0.1 Changelog: https://github.com/niccokunzmann/x-wr-timezone/blob/v1.0.1/README.rst#changelog --- .../python-modules/x-wr-timezone/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/x-wr-timezone/default.nix b/pkgs/development/python-modules/x-wr-timezone/default.nix index 4d873e9590f5..507180439589 100644 --- a/pkgs/development/python-modules/x-wr-timezone/default.nix +++ b/pkgs/development/python-modules/x-wr-timezone/default.nix @@ -4,46 +4,43 @@ fetchFromGitHub, setuptools, icalendar, - pytz, + tzdata, pytestCheckHook, restructuredtext-lint, pygments, + pytz, }: buildPythonPackage rec { pname = "x-wr-timezone"; - version = "0.0.7"; + version = "1.0.1"; pyproject = true; src = fetchFromGitHub { owner = "niccokunzmann"; repo = "x-wr-timezone"; rev = "v${version}"; - hash = "sha256-itqsVYYUcpbKTh0BM6IHk6F9xhB+pAQnnJsnZAVpNL4="; + hash = "sha256-MDFniFhgRuNtYITH/IUUP/HHC79coqxgXrlErj+Yrcs="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ icalendar - pytz + tzdata ]; nativeCheckInputs = [ pytestCheckHook restructuredtext-lint pygments + pytz ]; preCheck = '' export PATH=$out/bin:$PATH ''; - disabledTests = [ - "test_input_to_output" - "test_output_stays_the_same" - ]; - pythonImportsCheck = [ "x_wr_timezone" ]; meta = { From 7e4c6016a082970a91bd3f0dd62ebde47f7a16a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 29 Sep 2024 22:42:39 -0700 Subject: [PATCH 03/12] python312Packages.recurring-ical-events: 3.3.0 -> 3.3.2 Diff: https://github.com/niccokunzmann/python-recurring-ical-events/compare/v3.3.0...v3.3.2 Changelog: https://github.com/niccokunzmann/python-recurring-ical-events/blob/v3.3.2/README.rst#changelog --- .../python-modules/recurring-ical-events/default.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/recurring-ical-events/default.nix b/pkgs/development/python-modules/recurring-ical-events/default.nix index 3be853d2fc5e..de3e2f377d88 100644 --- a/pkgs/development/python-modules/recurring-ical-events/default.nix +++ b/pkgs/development/python-modules/recurring-ical-events/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "recurring-ical-events"; - version = "3.3.0"; + version = "3.3.2"; disabled = pythonOlder "3.8"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "niccokunzmann"; repo = "python-recurring-ical-events"; rev = "v${version}"; - hash = "sha256-1Ggxi61epge6Rxc/vJ7OuuNjjeaQYReEPeOZV8DLghk="; + hash = "sha256-1cWjOaL+STrHMux/fc+FaRVQIOMcseznNRcghsV+DtM="; }; build-system = [ setuptools ]; @@ -47,12 +47,6 @@ buildPythonPackage rec { pygments ]; - disabledTests = lib.optionals (lib.versionOlder icalendar.version "6") [ - # ModuleNotFoundError: No module named 'icalendar.timezone' - "test_can_import_zoneinfo" - "test_documentation_file" - ]; - pythonImportsCheck = [ "recurring_ical_events" ]; meta = { From 828ad80e8f5bb4fde4a048edbfb997743b200b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 30 Sep 2024 22:18:37 -0700 Subject: [PATCH 04/12] xandikos: fix compatibility with icalendar v6 --- pkgs/servers/xandikos/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/servers/xandikos/default.nix b/pkgs/servers/xandikos/default.nix index c22db465b223..c393f48ef9e9 100644 --- a/pkgs/servers/xandikos/default.nix +++ b/pkgs/servers/xandikos/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchpatch2 , python3Packages , nixosTests }: @@ -18,6 +19,15 @@ python3Packages.buildPythonApplication rec { hash = "sha256-cBsceJ6tib8OYx5L2Hv2AqRS+ADRSLIuJGIULNpAmEI="; }; + patches = [ + (fetchpatch2 { + name = "fix-compatibility-with-icalendar-v6.patch"; + url = "https://github.com/jelmer/xandikos/commit/ae8924c374ed86b2efde5bfbc75e56f6d8318086.patch"; + excludes = [ "requirements.txt" ]; + hash = "sha256-PCKo5C6Ejw9ZsFFLAMw1ZtMoCq9gJxR65K7CM6RUYwU="; + }) + ]; + nativeBuildInputs = with python3Packages; [ setuptools wheel @@ -31,6 +41,7 @@ python3Packages.buildPythonApplication rec { icalendar jinja2 multidict + pytz vobject ]; From 2ac9749b76c66670dae493bec03316eafcbf3522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 30 Sep 2024 22:20:57 -0700 Subject: [PATCH 05/12] xandikos: modernize --- pkgs/servers/xandikos/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/xandikos/default.nix b/pkgs/servers/xandikos/default.nix index c393f48ef9e9..d86ff503e803 100644 --- a/pkgs/servers/xandikos/default.nix +++ b/pkgs/servers/xandikos/default.nix @@ -1,14 +1,15 @@ -{ lib -, fetchFromGitHub -, fetchpatch2 -, python3Packages -, nixosTests +{ + fetchFromGitHub, + fetchpatch2, + lib, + nixosTests, + python3Packages, }: python3Packages.buildPythonApplication rec { pname = "xandikos"; version = "0.2.11"; - format = "pyproject"; + pyproject = true; disabled = python3Packages.pythonOlder "3.9"; @@ -28,12 +29,11 @@ python3Packages.buildPythonApplication rec { }) ]; - nativeBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools - wheel ]; - propagatedBuildInputs = with python3Packages; [ + dependencies = with python3Packages; [ aiohttp aiohttp-openmetrics dulwich From 504d32e69985ee156c39276cd5730fbd77f4ebbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 1 Oct 2024 13:11:17 -0700 Subject: [PATCH 06/12] todoman: depends on pytz --- pkgs/applications/office/todoman/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index eae9e424857f..f5f18b7b66b0 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -34,6 +34,7 @@ python3.pkgs.buildPythonApplication rec { parsedatetime python-dateutil pyxdg + pytz tabulate urwid ]; From 0a3284c46c46f0d6044cb2f8aaacea1a6f725200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 1 Oct 2024 13:13:30 -0700 Subject: [PATCH 07/12] todoman: modernize --- pkgs/applications/office/todoman/default.nix | 40 ++++++++++---------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index f5f18b7b66b0..75adb0425cc9 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -1,30 +1,32 @@ -{ lib -, fetchFromGitHub -, glibcLocales -, installShellFiles -, jq -, python3 +{ + fetchFromGitHub, + installShellFiles, + jq, + lib, + python3, }: python3.pkgs.buildPythonApplication rec { pname = "todoman"; version = "4.4.0"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "pimutils"; - repo = pname; + repo = "todoman"; rev = "refs/tags/v${version}"; hash = "sha256-5tQaNT6QVN9mxa9t6OvMux4ZGy4flUqszTAwet2QL0w="; }; nativeBuildInputs = [ installShellFiles - ] ++ (with python3.pkgs; [ - setuptools-scm - ]); + ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ + setuptools-scm + ]; + + dependencies = with python3.pkgs; [ atomicwrites click click-log @@ -40,17 +42,12 @@ python3.pkgs.buildPythonApplication rec { ]; nativeCheckInputs = with python3.pkgs; [ - flake8 - flake8-import-order freezegun hypothesis pytestCheckHook - glibcLocales pytest-cov-stub ]; - LC_ALL = "en_US.UTF-8"; - postInstall = '' installShellCompletion --bash contrib/completion/bash/_todo substituteInPlace contrib/completion/zsh/_todo --replace "jq " "${lib.getExe jq} " @@ -88,9 +85,14 @@ python3.pkgs.buildPythonApplication rec { now. Unsupported fields may not be shown but are never deleted or altered. ''; - changelog = "https://todoman.readthedocs.io/en/stable/changelog.html#v${builtins.replaceStrings ["."] ["-"] version}"; + changelog = "https://todoman.readthedocs.io/en/stable/changelog.html#v${ + builtins.replaceStrings [ "." ] [ "-" ] version + }"; license = lib.licenses.isc; - maintainers = with lib.maintainers; [ leenaars antonmosich ]; + maintainers = with lib.maintainers; [ + leenaars + antonmosich + ]; mainProgram = "todo"; }; } From 6a037c56377aad9262b3c3a21917379d54d82905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 1 Oct 2024 18:16:56 -0700 Subject: [PATCH 08/12] python312Packages.icalevents: fix compatibility with icalendar v6 --- pkgs/development/python-modules/icalevents/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/icalevents/default.nix b/pkgs/development/python-modules/icalevents/default.nix index 8c0839590676..b5303060948c 100644 --- a/pkgs/development/python-modules/icalevents/default.nix +++ b/pkgs/development/python-modules/icalevents/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch2, pythonOlder, pytestCheckHook, poetry-core, @@ -25,6 +26,14 @@ buildPythonPackage rec { hash = "sha256-Bp+Wz88q65Gem8LyRz0A4xE5hIgOD+iZ7E1UlnfFiD4="; }; + patches = [ + (fetchpatch2 { + name = "icalendar-v6-compat.patch"; + url = "https://github.com/jazzband/icalevents/commit/fa925430bd63e46b0941b84a1ae2c9a063f2f720.patch"; + hash = "sha256-MeRC3iJ5raKvl9udzv/44Vs34LxSzq1S6VVKAVFSpiY="; + }) + ]; + build-system = [ poetry-core ]; From b5efcf2ae66e198feb0856de8421518afcfee580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 13 Oct 2024 18:45:12 -0700 Subject: [PATCH 09/12] python312Packages.icalendar: 6.0.0 -> 6.0.1 Diff: https://github.com/collective/icalendar/compare/refs/tags/v6.0.0...v6.0.1 Changelog: https://github.com/collective/icalendar/blob/v6.0.1/CHANGES.rst --- pkgs/development/python-modules/icalendar/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/icalendar/default.nix b/pkgs/development/python-modules/icalendar/default.nix index e03544ac41d4..fb88bcfebc84 100644 --- a/pkgs/development/python-modules/icalendar/default.nix +++ b/pkgs/development/python-modules/icalendar/default.nix @@ -14,7 +14,7 @@ }: buildPythonPackage rec { - version = "6.0.0"; + version = "6.0.1"; pname = "icalendar"; pyproject = true; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "collective"; repo = "icalendar"; rev = "refs/tags/v${version}"; - hash = "sha256-eWFDY/pNVfcUk3PfB0vXqh9swuSGtflUw44IMDJI+yI="; + hash = "sha256-pcTiXRiHtx7jVzxDkY6WDhzo8sg8fPecqTpRSRIdvfs="; }; patches = [ From b23d5f6129afc312cf087fd42e6354bc78d1ad03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 13 Oct 2024 18:45:34 -0700 Subject: [PATCH 10/12] autosuspend: 7.0.1 -> 7.0.2 Diff: https://github.com/languitar/autosuspend/compare/refs/tags/v7.0.1...v7.0.2 Changelog: https://github.com/languitar/autosuspend/releases/tag/v7.0.2 --- pkgs/by-name/au/autosuspend/package.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/au/autosuspend/package.nix b/pkgs/by-name/au/autosuspend/package.nix index 479f6d69d736..16217b9f3fd6 100644 --- a/pkgs/by-name/au/autosuspend/package.nix +++ b/pkgs/by-name/au/autosuspend/package.nix @@ -6,7 +6,8 @@ python3.pkgs.buildPythonApplication rec { pname = "autosuspend"; - version = "7.0.1"; + version = "7.0.2"; + pyproject = true; disabled = python3.pythonOlder "3.10"; @@ -14,9 +15,13 @@ python3.pkgs.buildPythonApplication rec { owner = "languitar"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Zjo8H5PU6JezrBF0XBHvmePUTNeX74BX4NsHtPozcKs="; + hash = "sha256-QmZX5I1D1iYUQ6Ll0tkbpjzqaOIBaGAltKHwUqLB6uk="; }; + build-system = with python3.pkgs; [ + setuptools + ]; + dependencies = with python3.pkgs; [ dbus-python icalendar From 6cb9e538e532e11fdec75d873c59a2398e0e264e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 13 Oct 2024 18:53:01 -0700 Subject: [PATCH 11/12] khal: pin icalendar at 5.0.13 --- pkgs/applications/misc/khal/default.nix | 30 +++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix index 32c307af6025..1b5f3d54f247 100644 --- a/pkgs/applications/misc/khal/default.nix +++ b/pkgs/applications/misc/khal/default.nix @@ -6,7 +6,29 @@ , python3 }: -python3.pkgs.buildPythonApplication rec { +let + python = python3.override { + packageOverrides = self: super: { + # https://github.com/pimutils/khal/issues/1361 + icalendar = super.icalendar.overridePythonAttrs (old: rec { + version = "5.0.13"; + src = fetchFromGitHub { + owner = "collective"; + repo = "icalendar"; + rev = "refs/tags/v${version}"; + hash = "sha256-2gpWfLXR4HThw23AWxY2rY9oiK6CF3Qiad8DWHCs4Qk="; + }; + patches = [ ]; + build-system = with self; [ setuptools ]; + dependencies = with self; [ + python-dateutil + pytz + ]; + }); + }; + }; +in +python.pkgs.buildPythonApplication rec { pname = "khal"; version = "0.11.3"; pyproject = true; @@ -21,13 +43,13 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = [ glibcLocales installShellFiles - ] ++ (with python3.pkgs; [ + ] ++ (with python.pkgs; [ setuptools-scm sphinx sphinxcontrib-newsfeed ]); - propagatedBuildInputs = with python3.pkgs;[ + propagatedBuildInputs = with python.pkgs;[ atomicwrites click click-log @@ -45,7 +67,7 @@ python3.pkgs.buildPythonApplication rec { urwid ]; - nativeCheckInputs = with python3.pkgs;[ + nativeCheckInputs = with python.pkgs;[ freezegun hypothesis packaging From 9787a44e4ebb04c6c0a477eb7086893b24c2f531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 13 Oct 2024 18:57:11 -0700 Subject: [PATCH 12/12] khal: modernize --- pkgs/applications/misc/khal/default.nix | 41 +++++++++++++++---------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix index 1b5f3d54f247..b4151a9c5095 100644 --- a/pkgs/applications/misc/khal/default.nix +++ b/pkgs/applications/misc/khal/default.nix @@ -1,9 +1,10 @@ -{ lib -, stdenv -, fetchFromGitHub -, glibcLocales -, installShellFiles -, python3 +{ + lib, + stdenv, + fetchFromGitHub, + glibcLocales, + installShellFiles, + python3, }: let @@ -40,16 +41,17 @@ python.pkgs.buildPythonApplication rec { hash = "sha256-YP2kQ/qXPDwvFvlHf+A2Ymvk49dmt5tAnTaOhrOV92M="; }; + build-system = with python.pkgs; [ + setuptools + setuptools-scm + ]; + nativeBuildInputs = [ glibcLocales installShellFiles - ] ++ (with python.pkgs; [ - setuptools-scm - sphinx - sphinxcontrib-newsfeed - ]); + ]; - propagatedBuildInputs = with python.pkgs;[ + dependencies = with python.pkgs; [ atomicwrites click click-log @@ -67,7 +69,7 @@ python.pkgs.buildPythonApplication rec { urwid ]; - nativeCheckInputs = with python.pkgs;[ + nativeCheckInputs = with python.pkgs; [ freezegun hypothesis packaging @@ -83,8 +85,15 @@ python.pkgs.buildPythonApplication rec { --fish <(_KHAL_COMPLETE=fish_source $out/bin/khal) # man page - PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib-newsfeed ])}/bin:$PATH" \ - make -C doc man + PATH="${ + python3.withPackages ( + ps: with ps; [ + sphinx + sphinxcontrib-newsfeed + ] + ) + }/bin:$PATH" \ + make -C doc man installManPage doc/build/man/khal.1 # .desktop file @@ -93,7 +102,7 @@ python.pkgs.buildPythonApplication rec { doCheck = !stdenv.hostPlatform.isAarch64; - LC_ALL = "en_US.UTF-8"; + env.LC_ALL = "en_US.UTF-8"; disabledTests = [ # timing based