From 0de5dea92a52be9ad2d5ac9f3fb90f4e07755cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 2 Sep 2024 17:46:05 +0200 Subject: [PATCH] put render-options not in the toplevel nix store path on start python will do a listdir on the hole nix store otherwise --- docs/nix/flake-module.nix | 14 +++++++------- .../__init__.py} | 0 2 files changed, 7 insertions(+), 7 deletions(-) rename docs/nix/{scripts/renderOptions.py => render_options/__init__.py} (100%) diff --git a/docs/nix/flake-module.nix b/docs/nix/flake-module.nix index d2d82d6f4..89aef7e69 100644 --- a/docs/nix/flake-module.nix +++ b/docs/nix/flake-module.nix @@ -23,7 +23,7 @@ # Simply evaluated options (JSON) renderOptions = - pkgs.runCommand "renderOptions.py" + pkgs.runCommand "render-options" { # TODO: ruff does not splice properly in nativeBuildInputs depsBuildBuild = [ pkgs.ruff ]; @@ -34,12 +34,12 @@ ]; } '' - install ${./scripts/renderOptions.py} $out - patchShebangs --build $out + install -D -m755 ${./render_options}/__init__.py $out/bin/render-options + patchShebangs --build $out/bin/render-options - ruff format --check --diff $out - ruff check --line-length 88 $out - mypy --strict $out + ruff format --check --diff $out/bin/render-options + ruff check --line-length 88 $out/bin/render-options + mypy --strict $out/bin/render-options ''; asciinema-player-js = pkgs.fetchurl { @@ -70,7 +70,7 @@ mkdir $out # The python script will place mkDocs files in the output directory - python3 ${renderOptions} + exec python3 ${renderOptions}/bin/render-options ''; in { diff --git a/docs/nix/scripts/renderOptions.py b/docs/nix/render_options/__init__.py similarity index 100% rename from docs/nix/scripts/renderOptions.py rename to docs/nix/render_options/__init__.py