From de056b7fccc0d207fb628feefb2f23c585aae849 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Mon, 14 Jul 2025 10:22:11 +0000 Subject: [PATCH 1/2] python3Packages.docutils: Fix upstream URL (repo.or.cz -> sourceforge) I am seeing frequent HTTP 503 Service Unavailable responses from repo.or.cz, and I'm looking for an alternative upstream. The project's ultimate upstream appears to be SourceForge: the project homepage is hosted by SourceForge and the README references SourceForge as the ultimate source of releases. https://docutils.sourceforge.io/docs/dev/repository.html mentions the Git mirror at repo.or.cz, but this appears to be more of a (read-only?) convenience for project developers that prefer Git. There is also this footnote: There are also 3rd-party mirrors and forks at GitHub, some of them orphaned. At the time of this writing (2021-11-03), https://github.com/live-clones/docutils/tree/master/docutils provides an hourly updated clone. but this clone does not contain release tags. Due to how this project is organized and the connectivity problems to repo.or.cz, I suspect that the releases hosted on SourceForge are a better upstream for nixpkgs, than to download corresponding releases from the Git mirror at repo.or.cz. --- pkgs/development/python-modules/docutils/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix index 2789c78eca25..3c33405c38b2 100644 --- a/pkgs/development/python-modules/docutils/default.nix +++ b/pkgs/development/python-modules/docutils/default.nix @@ -1,6 +1,6 @@ { lib, - fetchFromRepoOrCz, + fetchurl, buildPythonPackage, flit-core, pillow, @@ -19,10 +19,9 @@ let disabled = pythonOlder "3.7"; - src = fetchFromRepoOrCz { - repo = "docutils"; - rev = "docutils-${version}"; - hash = "sha256-Q+9yW+BYUEvPYV504368JsAoKKoaTZTeKh4tVeiNv5Y="; + src = fetchurl { + url = "mirror://sourceforge/docutils/docutils-${version}.tar.gz"; + hash = "sha256-OmsYcy7fGC2qPNEndbuzOM9WkUaPke7rEJ3v9uv6mG8="; }; build-system = [ flit-core ]; @@ -53,7 +52,7 @@ let psfl gpl3Plus ]; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ jherland ]; }; }; in From ddc45de27bf5464794d34c4d2ed94e27cbef06f8 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Mon, 14 Jul 2025 10:35:01 +0000 Subject: [PATCH 2/2] python3Packages.docutils: Various minor updates/modernization --- .../python-modules/docutils/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/docutils/default.nix b/pkgs/development/python-modules/docutils/default.nix index 3c33405c38b2..2c9f3da24333 100644 --- a/pkgs/development/python-modules/docutils/default.nix +++ b/pkgs/development/python-modules/docutils/default.nix @@ -17,8 +17,6 @@ let version = "0.21.2"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchurl { url = "mirror://sourceforge/docutils/docutils-${version}.tar.gz"; hash = "sha256-OmsYcy7fGC2qPNEndbuzOM9WkUaPke7rEJ3v9uv6mG8="; @@ -33,7 +31,9 @@ let nativeCheckInputs = [ pillow ]; checkPhase = '' + runHook preCheck ${python.interpreter} test/alltests.py + runHook postCheck ''; # Create symlinks lacking a ".py" suffix, many programs depend on these names @@ -43,16 +43,20 @@ let done ''; - meta = with lib; { + pythonImportsCheck = [ "docutils" ]; + + meta = { description = "Python Documentation Utilities"; homepage = "http://docutils.sourceforge.net/"; - license = with licenses; [ + changelog = "https://sourceforge.net/projects/docutils/files/docutils/${version}"; + license = with lib.licenses; [ publicDomain bsd2 psfl gpl3Plus ]; - maintainers = with maintainers; [ jherland ]; + maintainers = with lib.maintainers; [ jherland ]; + mainProgram = "docutils"; }; }; in