summaryrefslogtreecommitdiffhomepage
path: root/.env
diff options
context:
space:
mode:
Diffstat (limited to '.env')
-rw-r--r--.env/echo-nixNote113
-rw-r--r--.env/local1
2 files changed, 114 insertions, 0 deletions
diff --git a/.env/echo-nixNote b/.env/echo-nixNote
new file mode 100644
index 0000000..7c8226d
--- /dev/null
+++ b/.env/echo-nixNote
@@ -0,0 +1,113 @@
+echo '-*- mode: org -*-
+
+* nixpkgs path?
+
+ # eval "$(nix print-dev-env)"
+' > nixNote_.org
+
+echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org
+
+echo '
+* nix build and show derivation
+
+#+BEGIN_SRC sh
+nix-shell --pure
+
+nix-build
+nix build -f default.nix --print-build-logs
+nix shell -f default.nix --print-build-logs
+nix develop --build -f derivation.nix -I .envrc --print-build-logs
+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
+#+END_SRC
+
+* version and build info
+
+#+BEGIN_SRC sh' >> nixNote_.org
+
+echo 'spine version (git) == $SpineVER' >> nixNote_.org
+echo "spine version (git) == $SpineVER" >> nixNote_.org
+echo 'nix-instantiate == `nix-instantiate`' >> nixNote_.org
+echo "nix-instantiate == `nix-instantiate`" >> nixNote_.org
+
+echo "#+END_SRC
+
+* initialised shell variables
+
+#+BEGIN_SRC sh
+SpineSRC=$SpineSRC
+SpineBIN=$SpineBIN
+SpineDOC=$SpineDOC
+SpinePOD=$SpinePOD
+#SpineOUTversioned=$SpineOUTversioned
+SpineOUT=$SpineOUT
+SpineCgiBIN=$SpineCgiBIN
+#+END_SRC
+" >> nixNote_.org
+
+echo '* cgi form spine_search nix build and copy to spine-search
+
+#+BEGIN_SRC sh
+nix-build && sudo cp -vi result/share/cgi-bin/spine_search $SpineCgiBIN/.
+#+END_SRC
+
+* spine run instruction examples
+** cgi operations (output to $SpineOUT)
+*** configuration
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr
+#+END_SRC
+
+*** generate html (linked to search form & curate)
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search"--output=$SpineOUT $SpinePOD/*
+#+END_SRC
+
+*** generate sql output
+
+#+BEGIN_SRC sh
+SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath"
+#+END_SRC
+
+*** generate curate
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --curate --output=$SpineOUT $SpinePOD/*
+$SpineBIN/spine -v --html --html-link-curate --curate --output=$SpineOUT $SpinePOD/*
+#+END_SRC
+
+*** create or re-create sql db (--sqlite-db-create or --sqlite-db-recreate)
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --sqlite-db-path="$SpineDBpath"
+#+END_SRC
+
+*** generate html (linked to search form), sql output, curate
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --sqlite-update --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/*
+#if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/*
+#+END_SRC
+
+*** make search form
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
+#$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/*
+#+END_SRC
+' >> nixNote_.org
+
+#cat nixNote_.org
+
+#echo "emacs nixNote_.org"
+#echo "cat nixNote_.org"
diff --git a/.env/local b/.env/local
new file mode 100644
index 0000000..8c18a87
--- /dev/null
+++ b/.env/local
@@ -0,0 +1 @@
+export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos