From 943564da299b69e34887754d8fa1ccc1731acef0 Mon Sep 17 00:00:00 2001 From: xenia Date: Mon, 29 Sep 2025 21:35:46 -0400 Subject: [PATCH] don't build docs for packages by default --- build-racket-package.nix | 4 ++++ flake.nix | 2 +- racket-install-hook.sh | 15 ++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build-racket-package.nix b/build-racket-package.nix index 9b3f637..234cb8f 100644 --- a/build-racket-package.nix +++ b/build-racket-package.nix @@ -20,6 +20,8 @@ dependencies ? [], tetheredInstallation ? false, + doMainSetup ? tetheredInstallation, + buildDocs ? tetheredInstallation, ... } @ attrs: { name = "racket${racket.version}-" + pname + "-" + version; @@ -30,6 +32,8 @@ dontBuild = true; racketTetheredInstallation = tetheredInstallation; + racketDoMainSetup = doMainSetup; + racketBuildDocs = buildDocs; nativeBuildInputs = [ racket diff --git a/flake.nix b/flake.nix index e04c7a7..0655e39 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ makeRacketEnv = self.callPackage ./make-racket-env.nix {}; testEnv = self.makeRacketEnv { - packages = [self.ansi-color]; + packages = [self.ansi-color self.curly-fn-lib]; }; ansi-color = self.callPackage ( diff --git a/racket-install-hook.sh b/racket-install-hook.sh index 3f25b32..0dfe22c 100644 --- a/racket-install-hook.sh +++ b/racket-install-hook.sh @@ -122,12 +122,12 @@ racketInstallPhase() { EOF echo Initializing installation layer - if [ "$racketTetheredInstallation" == "true" ]; then + if [ "$racketTetheredInstallation" == "1" ]; then racket --config $out/etc/racket/ --no-user-path -l- \ - raco setup - else + raco setup --no-zo + elif [ "$racketDoMainSetup" == "1" ]; then racket --config $out/etc/racket/ --no-user-path -l- \ - raco setup --no-launcher + raco setup --no-zo --no-launcher rm $out/bin/mzscheme # ???? fi @@ -136,8 +136,13 @@ EOF echo Skipping raco pkg install else echo Running raco pkg install + racoflags="" + if [ "$racketBuildDocs" != "1" ]; then + racoflags="--no-docs" + fi racket --config $out/etc/racket/ --no-user-path -l- \ - raco pkg install --installation --deps fail --copy --name "$pname" "$(readlink -e .)" + raco pkg install --installation --deps fail --copy --name "$pname" $racoflags \ + "$(readlink -e .)" fi runHook postInstall