From 529ef04b4280a243b12ad6403020ba374d1391a2 Mon Sep 17 00:00:00 2001 From: Dzmitry Shuiski Date: Sun, 1 Dec 2024 00:32:34 +0100 Subject: [PATCH] Fix "docs" Makefile target: Restore searchable docs --- Makefile | 17 ++++++----------- flake.nix | 13 +------------ 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 5b00600..9e53157 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,6 @@ purs-args := "--stash --censor-lib --censor-codes=ImplicitImport,ImplicitQualifi example-docker := example/minimal/docker/cluster/docker-compose.yaml example-keys := example/minimal/docker/cluster/keys/ -system := $(shell uname -s) -ifeq (${system},Linux) - open-in-browser := xdg-open -else - open-in-browser := open -endif - requires-nix-shell: @[ "$(IN_NIX_SHELL)" ] || \ ( echo "The '$(MAKECMDGOALS)' target must be run from inside a nix shell, run 'nix develop' first." \ @@ -30,11 +23,13 @@ format: requires-nix-shell repl: requires-nix-shell spago repl -docs: - nix build .#docs - ${open-in-browser} result/generated-docs/html/index.html +docs: requires-nix-shell + mv package.json package.json.old + jq 'del(.type)' package.json.old > package.json + spago docs --open + mv -f package.json.old package.json -build-example: +build-example: requires-nix-shell cd example/minimal && \ spago build --purs-args ${purs-args} diff --git a/flake.nix b/flake.nix index f0d061b..1208505 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,7 @@ packageLockOnly = true; packages = with pkgs; [ fd + jq hydra.packages.${system}.hydra-node nixpkgs-fmt nodePackages.prettier @@ -76,18 +77,6 @@ } ); - packages = perSystem (system: - let - pkgs = nixpkgsFor system; - project = psProjectFor system pkgs; - in - { - docs = project.buildPursDocs { - packageName = projectName; - }; - } - ); - apps = perSystem (system: let pkgs = nixpkgsFor system;