From 85a2a2922673bfe44461e26b68cb1da0de5bb8c7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 20 Sep 2021 20:02:10 -0400 Subject: nix related config, direnv else minor --- sundry/spine_search_cgi/.envrc-local_ | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'sundry/spine_search_cgi/.envrc-local_') diff --git a/sundry/spine_search_cgi/.envrc-local_ b/sundry/spine_search_cgi/.envrc-local_ index d14a371..e79a418 100644 --- a/sundry/spine_search_cgi/.envrc-local_ +++ b/sundry/spine_search_cgi/.envrc-local_ @@ -1,10 +1,10 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos #export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs # reload when these files change -watch_file flake.nix +# watch_file flake.nix # watch_file flake.lock ## load the flake devShell -eval "$(nix print-dev-env)" +# 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 @@ -12,17 +12,17 @@ export SpineBIN=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform/resul export SpineDOC=/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples export SpinePOD=$SpineDOC/markup/pod #export SpineOUTversioned=/srv/www/spine/$SpineVER -export SpineOUTstatic=/srv/www/spine/static +export SpineOUT=/srv/www/spine export SpineCgiBIN=/var/www/cgi/cgi-bin echo '-*- mode: org -*- * nixpkgs path? - eval "$(nix print-dev-env)" -' > nix_note_.org + # eval "$(nix print-dev-env)" +' > nixNote_.org -echo " == `nix-instantiate --find-file nixpkgs`" >> nix_note_.org +echo " == `nix-instantiate --find-file nixpkgs`" >> nixNote_.org echo ' * nix build and show derivation @@ -46,12 +46,12 @@ nix search --json 2>/dev/null |jq * version and build info -#+BEGIN_SRC sh' >> nix_note_.org +#+BEGIN_SRC sh' >> nixNote_.org -echo 'spine version (git) == $SpineVER' >> nix_note_.org -echo "spine version (git) == $SpineVER" >> nix_note_.org -echo 'nix-instantiate == `nix-instantiate`' >> nix_note_.org -echo "nix-instantiate == `nix-instantiate`" >> nix_note_.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 @@ -63,10 +63,10 @@ SpineBIN=$SpineBIN SpineDOC=$SpineDOC SpinePOD=$SpinePOD #SpineOUTversioned=$SpineOUTversioned -SpineOUTstatic=$SpineOUTstatic +SpineOUT=$SpineOUT SpineCgiBIN=$SpineCgiBIN #+END_SRC -" >> nix_note_.org +" >> nixNote_.org echo '* cgi form spine_search nix build and copy to spine-search @@ -75,7 +75,7 @@ nix-build && sudo cp -vi result/share/cgi-bin/spine_search $SpineCgiBIN/. #+END_SRC * spine run instruction examples -** cgi operations (output to $SpineOUTstatic) +** cgi operations (output to $SpineOUT) *** configuration #+BEGIN_SRC sh @@ -85,43 +85,43 @@ $SpineBIN/spine -v --show-config --config=$SpinePOD/.dr *** 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=$SpineOUTstatic $SpinePOD/* +$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" --output=$SpineOUTstatic $SpinePOD/* +SpineBIN/spine -v --sqlite-update --sqlite-db-filename="spine.search.db" --output=$SpineOUT $SpinePOD/* #+END_SRC *** generate curate #+BEGIN_SRC sh -$SpineBIN/spine -v --curate --output=$SpineOUTstatic $SpinePOD/* -$SpineBIN/spine -v --html --html-link-curate --curate --output=$SpineOUTstatic $SpinePOD/* +$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" --output="$SpineOUTstatic" +$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="spine.search.db" --output="$SpineOUT" #+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 --output=$SpineOUTstatic $SpinePOD/* +$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 --output=$SpineOUT $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=$SpineOUTstatic $SpinePOD/* +#$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/* #+END_SRC -' >> nix_note_.org +' >> nixNote_.org -cat nix_note_.org +#cat nixNote_.org -echo "emacs nix_note_.org" -echo "cat nix_note_.org" +#echo "emacs nixNote_.org" +#echo "cat nixNote_.org" -- cgit v1.2.3