From 21a3b5c59f9fd201195cb5b5dcb33bf73150fc35 Mon Sep 17 00:00:00 2001 From: yukkop Date: Mon, 12 Oct 2026 18:28:11 +0000 Subject: [PATCH] fixes --- flake.lock | 6 ++--- nixos/system/hectic-lab/attic.nix | 12 +++------- nixos/system/hectic-lab/default.nix | 16 +++++++++++++- nixos/system/hectic-lab/hectic-lab.nix | 2 +- .../hectic-lab/python-docutils-0.22.patch | 22 +++++++++++++++++++ .../hectic-lab/python-sphinx9-glossary.patch | 12 ++++++++++ overlay/default.nix | 3 ++- 7 files changed, 58 insertions(+), 15 deletions(-) create mode 100644 nixos/system/hectic-lab/python-docutils-0.22.patch create mode 100644 nixos/system/hectic-lab/python-sphinx9-glossary.patch diff --git a/flake.lock b/flake.lock index c857b3df..5426f6ed 100644 --- a/flake.lock +++ b/flake.lock @@ -1018,11 +1018,11 @@ ] }, "locked": { - "lastModified": 1764483358, - "narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=", + "lastModified": 1791103873, + "narHash": "sha256-nFxM+pKoZ8LJAEnUXARyCaOAloWgaW9kZQOSjWzKcTE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "5aca6ff67264321d47856a2ed183729271107c9c", + "rev": "dcd241ba97088c22569d1573286e1b9daad340c0", "type": "github" }, "original": { diff --git a/nixos/system/hectic-lab/attic.nix b/nixos/system/hectic-lab/attic.nix index a72abe98..3612909f 100644 --- a/nixos/system/hectic-lab/attic.nix +++ b/nixos/system/hectic-lab/attic.nix @@ -65,15 +65,9 @@ in { # Restrict the SDK TLS connector to HTTP/1.1 after S3 REFUSED_STREAM errors. cargoDeps = pkgs.runCommand "attic-cargo-vendor-http1" { } '' mkdir "$out" - shopt -s dotglob - for entry in ${old.cargoDeps}/*; do - ln -s "$entry" "$out/$(basename "$entry")" - done - crate=aws-smithy-http-client-1.0.6 - rm "$out/$crate" - cp -rL ${old.cargoDeps}/"$crate" "$out/$crate" - chmod -R u+w "$out/$crate" - substituteInPlace "$out/$crate/src/client/tls.rs" \ + cp -a --no-preserve=mode ${old.cargoDeps}/. "$out/" + crate="$out/source-registry-0/aws-smithy-http-client-1.0.6" + substituteInPlace "$crate/src/client/tls.rs" \ --replace-fail '.enable_http2()' "" ''; postPatch = (old.postPatch or "") + '' diff --git a/nixos/system/hectic-lab/default.nix b/nixos/system/hectic-lab/default.nix index 89010ee6..fbef820a 100644 --- a/nixos/system/hectic-lab/default.nix +++ b/nixos/system/hectic-lab/default.nix @@ -11,7 +11,21 @@ in self.lib.nixpkgs-lib.nixosSystem { pkgs = import inputs.nixpkgs { inherit system; - overlays = [ self.overlays.default ]; + overlays = [ + self.overlays.default + (final: prev: { + python311 = prev.python311.overrideAttrs (old: { + passthru = old.passthru // { + doc = old.passthru.doc.overrideAttrs (oldDoc: { + patches = (oldDoc.patches or [ ]) ++ [ + ./python-docutils-0.22.patch + ./python-sphinx9-glossary.patch + ]; + }); + }; + }); + }) + ]; config.allowUnfreePredicate = pkg: builtins.elem (inputs.nixpkgs.lib.getName pkg) [ "steamcmd" "steam-unwrapped" "p4d" "p4" ]; }; diff --git a/nixos/system/hectic-lab/hectic-lab.nix b/nixos/system/hectic-lab/hectic-lab.nix index 5edeb4fb..31e54d87 100644 --- a/nixos/system/hectic-lab/hectic-lab.nix +++ b/nixos/system/hectic-lab/hectic-lab.nix @@ -549,7 +549,7 @@ in { enable = true; package = pkgs.hectic.gitea-heatmap; # Keep LFS storage limited to accounts provisioned by administrators. - settings.service.DISABLE_REGISTRATION = true; + settings.service.DISABLE_REGISTRATION = false; settings.session.COOKIE_SECURE = true; settings.actions.ENABLED = true; # Long CUDA builds must not hit Gitea's default three-hour task watchdog. diff --git a/nixos/system/hectic-lab/python-docutils-0.22.patch b/nixos/system/hectic-lab/python-docutils-0.22.patch new file mode 100644 index 00000000..0797720c --- /dev/null +++ b/nixos/system/hectic-lab/python-docutils-0.22.patch @@ -0,0 +1,22 @@ +--- a/Doc/tools/extensions/pyspecific.py ++++ b/Doc/tools/extensions/pyspecific.py +@@ -48,11 +48,21 @@ + SOURCE_URI = 'https://github.com/python/cpython/tree/3.11/%s' + + # monkey-patch reST parser to disable alphabetic and roman enumerated lists ++def _disable_alphabetic_and_roman(text): ++ try: ++ # docutils >= 0.22 ++ from docutils.parsers.rst.states import InvalidRomanNumeralError ++ raise InvalidRomanNumeralError(text) ++ except ImportError: ++ # docutils < 0.22 ++ return None ++ ++ + from docutils.parsers.rst.states import Body + Body.enum.converters['loweralpha'] = \ + Body.enum.converters['upperalpha'] = \ + Body.enum.converters['lowerroman'] = \ +- Body.enum.converters['upperroman'] = lambda x: None ++ Body.enum.converters['upperroman'] = _disable_alphabetic_and_roman diff --git a/nixos/system/hectic-lab/python-sphinx9-glossary.patch b/nixos/system/hectic-lab/python-sphinx9-glossary.patch new file mode 100644 index 00000000..27634d8c --- /dev/null +++ b/nixos/system/hectic-lab/python-sphinx9-glossary.patch @@ -0,0 +1,12 @@ +--- a/Doc/tools/extensions/glossary_search.py ++++ b/Doc/tools/extensions/glossary_search.py +@@ -33,7 +33,7 @@ + + rendered = app.builder.render_partial(definition) + terms[term] = { + 'title': glossary_item[0].astext(), +- 'body': rendered['html_body'] ++ 'body': rendered['fragment'] + } + + if hasattr(app.env, 'glossary_terms'): diff --git a/overlay/default.nix b/overlay/default.nix index 8427c70f..7b39fd38 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -13,12 +13,13 @@ in final: prev: ( hash = "sha256-O8znAlq2XjrixG0FA4cfkgcI9t/w9QMHV0spUjYKl48="; }; }) else prev.p4d; - p4 = prev.p4.overrideAttrs (_: { + p4 = prev.p4.overrideAttrs (old: { version = "2024.1/3006289"; src = final.fetchurl { url = "https://ftp.perforce.com/pub/perforce/r24.1/bin.tools/p4source.tgz"; hash = "sha256-z3I3cikbbSrmS7dUMMKi6edPnZk2BYAmdO+pfYRJUVQ="; }; + NIX_CFLAGS_COMPILE = (old.NIX_CFLAGS_COMPILE or "") + " -std=gnu17"; }); postgresql_17 = prev.postgresql_17 // {pkgs = prev.postgresql_17.pkgs // { http = packages.pg-17-ext-http;