aboutsummaryrefslogtreecommitdiffhomepage
path: root/sundry/spine_search_cgi/.envrc-local_
diff options
context:
space:
mode:
Diffstat (limited to 'sundry/spine_search_cgi/.envrc-local_')
-rw-r--r--sundry/spine_search_cgi/.envrc-local_88
1 files changed, 88 insertions, 0 deletions
diff --git a/sundry/spine_search_cgi/.envrc-local_ b/sundry/spine_search_cgi/.envrc-local_
new file mode 100644
index 0000000..276950b
--- /dev/null
+++ b/sundry/spine_search_cgi/.envrc-local_
@@ -0,0 +1,88 @@
+export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
+#export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs
+## reload when these files change
+#use flake
+watch_file flake.nix
+# watch_file flake.lock
+## load the flake devShell
+eval "$(nix print-dev-env)"
+# echo $NIX_BUILD_TOP
+export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g')
+export SpineSRC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform
+export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples
+export SpineOUT=/tmp/spine/$SpineVER/www
+export SpineOUTstatic=/var/www
+
+echo '-*- mode: org -*-
+
+* nixpkgs path?
+
+ eval "$(nix print-dev-env)"
+' > nix_note_
+
+echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nix_note_
+
+echo '
+* nix build and show derivation
+
+ nix-shell --pure
+
+ nix-build
+ nix build -f default.nix
+ nix shell -f default.nix
+ nix-instantiate | nix-build
+ nix build `nix-instantiate`
+
+ nix develop
+
+ nix-instantiate | nix show-derivation | jq
+ nix-instantiate | nix show-derivation --recursive | jq
+
+ nix search --json 2>/dev/null |jq
+
+* version and build info
+' >> nix_note_
+
+echo " spine version (git) == $SpineVER" >> nix_note_
+echo " nix-instantiate == `nix-instantiate`" >> nix_note_
+
+echo "
+* initialised shell variables
+
+ SpineSRC=$SpineSRC
+ SpineDOC=$SpineDOC
+ SpineOUT=$SpineOUT
+ SpineOUTstatic=$SpineOUTstatic
+" >> nix_note_
+
+echo '* spine run instruction examples
+** cgi operations (output to $SpineOUTstatic /var/www)
+
+ $SpineSRC/result/bin/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --show-config --config=$SpineDOC/markup/pod/.dr
+
+ $SpineSRC/result/bin/spine --html $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --output="$SpineOUTstatic" $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+ $SpineSRC/result/bin/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+
+ $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site
+
+ $SpineSRC/result/bin/spine -v --html --html-link-search --html-link-harvest --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+
+ - generate html linked to search form
+ $SpineSRC/result/bin/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --sqlite-update --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+ - make search form
+ $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site
+ #$SpineSRC/result/bin/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/*
+
+' >> nix_note_
+cat nix_note_
+echo "cat nix_note_"