From 9f7291ce682c83b3da762fb236e97f5555c14be8 Mon Sep 17 00:00:00 2001 From: emilylange Date: Wed, 5 Nov 2025 01:10:52 +0100 Subject: [PATCH] docs: fix Read the Docs by using portable-nix As of recently, Nix 2.6 from Ubuntu 22.04 became too old to evaluate nixpkgs. A new-enough version of Nix is available as part of Ubuntu 24.04, but those newer versions of Nix aren't happy with our rather primitive proot workaround anymore. Thankfully, someone already made a version of Nix that does all the heavy lifting for running in unprivileged environments like the one Read the Docs provides. So we used that instead. --- .readthedocs.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 99a66d4..0ee8bfd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,17 +5,18 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3" apt_packages: - - nix + - curl - proot jobs: pre_install: - - mkdir -p ~/.nix ~/.config/nix - - echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf - - proot -b ~/.nix:/nix /bin/sh -c "nix build -L .#optionsDoc && cp -v result docs/options.md" + - curl -L https://github.com/DavHau/nix-portable/releases/latest/download/nix-portable-$(uname -m) > ./nix-portable + - chmod +x ./nix-portable + - ./nix-portable nix build --print-build-logs .#optionsDoc + - ./nix-portable nix store cat $(readlink result) > docs/options.md sphinx: configuration: docs/conf.py