aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-01-27 13:38:06 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2023-01-27 23:18:05 -0500
commit69d8f2d64be94c722f546b023094ff7d48cd9383 (patch)
treea75efb66fe6585e6a40458bd4918efa8a5d68692
parentnix & build housekeeping, alternative D compilers (diff)
nix flake & build, devShells etc.
-rw-r--r--.env/echo-nixNote239
-rw-r--r--.env/nix-commands20
-rw-r--r--.envrc44
-rw-r--r--.envrc-local_19
-rw-r--r--.gitattributes3
-rw-r--r--.gitignore2
-rw-r--r--derivation.nix2
-rw-r--r--flake.lock14
-rw-r--r--flake.nix116
-rw-r--r--org/config_git.org25
-rw-r--r--org/config_nix.org560
-rwxr-xr-xshell.nix2
12 files changed, 843 insertions, 203 deletions
diff --git a/.env/echo-nixNote b/.env/echo-nixNote
new file mode 100644
index 0000000..8b39e61
--- /dev/null
+++ b/.env/echo-nixNote
@@ -0,0 +1,239 @@
+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-instantiate -I .envrc | nix-build -I .envrc
+nix build `nix-instantiate`
+nix build `nix-instantiate -I .envrc`
+
+nix develop
+
+nix-instantiate | nix show-derivation | jq
+nix-instantiate -I .envrc | nix show-derivation -f derivation.nix -I .envrc | jq
+
+nix-instantiate | nix show-derivation --recursive | jq
+nix-instantiate -I .envrc | nix show-derivation -f derivation.nix --recursive -I .envrc | 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
+SpineDOC=$SpineDOC
+SpinePOD=$SpinePOD
+SpineOUTversioned=$SpineOUTversioned
+SpineOUT=$SpineOUT
+#+END_SRC
+" >> nixNote_.org
+
+echo '* spine run instruction examples
+** parallelized tasks
+*** doc source
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** html & epub output
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** sqlite db for each document - populate each db
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** doc source; html, epub; sqlite outputs
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** curate (authors topics)
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** html, curate
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --dark --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
+$SpineBIN/spine --very-verbose --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** composite command: source pod, html, epub, curate, sqlite
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+** sequential tasks
+*** sqlite db (shared) - create db
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned"
+#+END_SRC
+
+*** sqlite db (shared) - populate db
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/*
+#+END_SRC
+
+*** sqlite db (shared) - drop db
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned"
+#+END_SRC
+
+*** sqlite db (shared) - create & populate db (single step)
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+*** composite command: source pod, html, epub, curate, sqlite
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+#+END_SRC
+
+** config [./pod/].dr/config_local_site
+
+#+BEGIN_SRC sh
+cat $SpinePOD/.dr/config_local_site
+$SpineBIN/spine --show-config $SpinePOD
+$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD
+#+END_SRC
+
+** cgi operations (output to $SpineOUT /var/www)
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/*
+
+$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/*
+
+$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr
+
+$SpineBIN/spine --html $SpinePOD/*
+
+
+$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
+#+END_SRC
+
+*** generate html linked to search form
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --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-create --sqlite-db-filename="" --sqlite-db-path="$SpineDBpath"
+$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="" --sqlite-db-path="$SpineDBpath"
+#+END_SRC
+
+*** populate sqlite db
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --sqlite-update --sqlite-db-filename="" --output=$SpineOUT $SpinePOD/*
+#+END_SRC
+
+*** generate html (linked to search form), sql output, curate COMPOSITE
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="" --cgi-sqlite-search-filename="" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/*
+$SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/*
+#+END_SRC
+
+*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration
+
+if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/*
+#+END_SRC
+
+#+BEGIN_SRC yaml
+# sample resource configuration file ( $SpinePOD/.rc/config_local_site )
+output:
+ path: "/srv/www/spine"
+default:
+ language: "en"
+ papersize: "a4"
+ text_wrap: "80"
+ digest: "sha256"
+webserv:
+ http: "http"
+ domain: "localhost"
+ data_http: "http"
+ data_domain: "localhost"
+ data_root_url: "https://sisudoc.org"
+ data_root_path: "/srv/www/spine"
+ images_root_part: "image"
+ cgi_search_form_title: "≅ SiSU Spine search"
+ cgi_http: "https"
+ cgi_domain: "sisudoc.org"
+ cgi_bin_url: "http://sisudoc.org/cgi-bin"
+ cgi_bin_part: "cgi-bin"
+ cgi_bin_path: "/var/www/cgi/cgi-bin"
+ cgi_search_script: ""
+ cgi_action: "https://sisudoc.org/spine_search"
+ db_sqlite_filename: ""
+ db_sqlite_path: "/var/www/sqlite"
+#+END_SRC
+
+*** make search form
+
+#+BEGIN_SRC sh
+$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
+#+END_SRC
+
+*** latex
+
+#+BEGIN_SRC sh
+$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/*
+ls $SpineOutstatic/latex/*.tex
+#+END_SRC
+' >> nixNote_.org
+
+#cat nixNote_.org
+
+#echo "emacs nixNote_.org"
+#echo "cat nixNote_.org"
diff --git a/.env/nix-commands b/.env/nix-commands
new file mode 100644
index 0000000..7cfa723
--- /dev/null
+++ b/.env/nix-commands
@@ -0,0 +1,20 @@
+- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+
+- nix build .#default --print-build-logs
+- nix build .#spine-dmd --print-build-logs
+- nix build .#spine-ldc --print-build-logs
+- nix build .#spine-gdc --print-build-logs
+
+- nix develop
+ - nix develop .#devShell --print-build-logs
+ - nix develop .#devShell-html --print-build-logs
+ - nix develop .#devShell-epub --print-build-logs
+ - nix develop .#devShell-latex-pdf --print-build-logs
+ - nix develop .#devShell-sqlite --print-build-logs
+ - nix develop .#devShell-i18n --print-build-logs
+
+nix run .#default --print-build-logs
+
+nix develop --build .#default --print-build-logs
+
+nix-shell '<nixpkgs>' -A nix --pure
diff --git a/.envrc b/.envrc
index 05a7c3f..a874689 100644
--- a/.envrc
+++ b/.envrc
@@ -1,34 +1,34 @@
use flake .
#use flake .#default
NIX_ENFORCE_PURITY=1
-NixDirEnvVersion="2.2.0"
+NixDirEnvVersion="2.2.1"
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
# - https://github.com/nix-community/nix-direnv
# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
watch_file flake.lock
watch_file flake.nix
-nix flake update && nix flake check --show-trace && nix flake show
+#nix flake update && nix flake check --show-trace && nix flake show
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
fi
-echo "
-
-- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
-
-- nix build .#default --print-build-logs
-- nix build .#spine-dmd --print-build-logs
-- nix build .#spine-ldc --print-build-logs
-- nix build .#spine-gdc --print-build-logs
-
-nix-shell '<nixpkgs>' -A nix --pure
-
-nix run .#default --print-build-logs
-
-nix develop --build .#default --print-build-logs
-
-nix shell .#default --print-build-logs --command spine -v
-nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" ./markup/pod
-nix shell .#default --print-build-logs --command spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" ./markup/pod
-"
+# echo "
+#
+# - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+#
+# - nix build .#default --print-build-logs
+# - nix build .#spine-dmd --print-build-logs
+# - nix build .#spine-ldc --print-build-logs
+# - nix build .#spine-gdc --print-build-logs
+#
+# nix-shell '<nixpkgs>' -A nix --pure
+#
+# nix run .#default --print-build-logs
+#
+# nix develop --build .#default --print-build-logs
+#
+# nix shell .#default --print-build-logs --command spine -v
+# nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" ./markup/pod
+# nix shell .#default --print-build-logs --command spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" ./markup/pod
+# "
diff --git a/.envrc-local_ b/.envrc-local_
index 4a9aa66..2b68c94 100644
--- a/.envrc-local_
+++ b/.envrc-local_
@@ -1,23 +1,16 @@
PATH_add result/bin
-#path_add PATH result/bin
#export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
+#export NIX_PATH=/srv/nix/nixpkgs
#export NIX_PATH=nixpkgs=/srv/nix/nixpkgs
export DFLAGS="-O2 -inline -boundscheck=on -color=on"
-## load the flake devShell
-# eval "$(nix print-dev-env)"
-# echo $NIX_BUILD_TOP
-export Date=`date "+%Y%m%d"`
+#export SpineBIN=result/bin
+export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine
export SpineDOC=.
-#export SpineSRC=
-export SpineBIN=result/bin
-#export SpineDOC=
-export SpinePOD=$SpineDOC/markup/pod
export SpineOUT=/srv/www/spine
-export SpineDBpath=/srv/www/spine/sqlite
-#export SpineDBpath=/var/www/sqlite
+export SpineDBpath=/var/www/sqlite
+#export SpineDBpath=/srv/www/spine/sqlite
+export SpineCGIbin=/var/www/cgi/cgi-bin
export SpineSearchActionLocal='http://localhost/spine_search'
export SpineSearchActionRemote='https://sisudoc.org/spine_search'
export SpineCGIform='spine_search'
export SpineSQLdb='spine.search.db'
-#export PROG_VER_DECLARED="`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`"
-#direnv allow
diff --git a/.gitattributes b/.gitattributes
index d157ce9..d883b29 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,5 @@
/org export-ignore
.gitattributes export-ignore
-.gitignore export-ignore
+#.gitignore export-ignore
tangle export-ignore
+flake.lock export-ignore
diff --git a/.gitignore b/.gitignore
index 0ec3f5f..27c05f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,8 @@
!*.nix
!flake.lock
!.envrc
+!.env
+!.env/**
!README
!COPYRIGHT
!CHANGELOG
diff --git a/derivation.nix b/derivation.nix
index 3b9ce81..5a728f7 100644
--- a/derivation.nix
+++ b/derivation.nix
@@ -100,7 +100,7 @@ mkDubDerivation rec {
meta = with pkgs.lib; {
description = "A sisu like parser & document generator";
longDescription = ''
- A sisu like parser & document generator
+ a sisu like parser & document generator
'';
homepage = "https://sisudoc.org";
license = licenses.agpl3Plus;
diff --git a/flake.lock b/flake.lock
index 1abb1d3..331f864 100644
--- a/flake.lock
+++ b/flake.lock
@@ -32,11 +32,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1674487464,
- "narHash": "sha256-Jgq50e4S4JVCYpWLqrabBzDp/1mfaxHCh8/OOorHTy0=",
+ "lastModified": 1674839022,
+ "narHash": "sha256-8F1U06t9glkgBC8gBfjoA2eeUb9MYRRp6NMKY3c0VEI=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "3954218cf613eba8e0dcefa9abe337d26bc48fd0",
+ "rev": "14b6cf7602c341e525a8fe17ac2349769376515e",
"type": "github"
},
"original": {
@@ -61,11 +61,11 @@
]
},
"locked": {
- "lastModified": 1674658431,
- "narHash": "sha256-nLZ8zbv+YCxupB67bZvjZlbFL92Fbtj0qCt4T+jdEdA=",
+ "lastModified": 1674863393,
+ "narHash": "sha256-qxpVM7P8BIZqvx/xRojznXY7jbD8PdtHqZxOZrOB0IM=",
"ref": "refs/heads/main",
- "rev": "d15d729ee55a77effcf75c3730ad3648275e880d",
- "revCount": 571,
+ "rev": "f7d1b8f0326b7adfcdbd5eb1adbc1c4fd2d99c60",
+ "revCount": 572,
"type": "git",
"url": "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine"
},
diff --git a/flake.nix b/flake.nix
index 0a02c3c..c110f56 100644
--- a/flake.nix
+++ b/flake.nix
@@ -7,9 +7,11 @@
spine.inputs.nixpkgs.follows = "nixpkgs";
spine.flake = true;
};
- outputs = { self, nixpkgs, flake-utils, spine }:
+ outputs = { self, nixpkgs, flake-utils, spine } @inputs:
let
version = "0.12.0";
+ shell = ./shell.nix; # ./default.nix;
+ devEnv = ./.envrc; # ./shell.nix; # ./default.nix;
supportedSystems = [ "x86_64-linux" ]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); # nixpkgs instantiated for supported system types.
@@ -24,9 +26,115 @@
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
devShells = forAllSystems (system:
- let pkgs = nixpkgsFor.${system};
+ let
+ pkgs = nixpkgsFor.${system};
+ shellHook = ''
+ export DFLAGS="-O2 -inline -boundscheck=on -color=on"
+ export Date=`date "+%Y%m%d"`
+ ### set local values in .envrc-local (or modify here if you must)
+ # export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine
+ # export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples
+ # export SpineOUT=/srv/www/spine
+ export SpineDBpath=/var/www/sqlite
+ # export SpineDBpath=/srv/www/spine/sqlite
+ export SpineSRC=$SpinePROJ/src
+ export SpineBIN=$SpinePROJ/result/bin
+ export SpinePOD=$SpineDOC/markup/pod
+ export SpineSearchActionLocal='http://localhost/spine_search'
+ export SpineSearchActionRemote='https://sisudoc.org/spine_search'
+ export SpineCGIform='spine_search'
+ export SpineSQLdb='spine.search.db'
+ export spineNixHelp="cat ./.env/nix-commands"
+ export spineTest="nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineHtml="spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineEpub="spine --very-verbose --epub --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineLatex="spine --very-verbose --latex --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spinePdf="spine --very-verbose --pdf --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineSqliteCreateDB="spine --very-verbose --sqlite-db-recreate --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\""
+ export spineSqlite="spine --very-verbose --sqlite-discrete --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ #export spineSqlite="spine --very-verbose --sqlite-update --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ '';
in with pkgs; {
- devShell = mkShell { buildInputs = [ git dub dmd ldc gdc sqlite ]; };
- });
+ devShell = mkShell rec {
+ name = "spine dev shell default";
+ inherit shell;
+ inherit devEnv;
+ #buildInputs = [ sqlite ];
+ #nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-epub = mkShell rec {
+ name = "spine dev shell for epub output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ epr
+ sigil
+ calibre #(suite includes: ebook-viewer)
+ foliate
+ ];
+ inherit shellHook;
+ };
+ devShell-html = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-latex-pdf = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ source-sans-pro
+ source-serif-pro
+ source-code-pro
+ texlive.combined.scheme-full
+ ];
+ inherit shellHook;
+ };
+ devShell-sqlite = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-i18n = mkShell {
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ perl534Packages.Po4a
+ ];
+ inherit shellHook;
+ };
+ });
};
}
diff --git a/org/config_git.org b/org/config_git.org
index b0959ae..dfc7589 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -25,13 +25,15 @@
# git clean -ix
# find . -name "*_" | xargs rm -rf
# find . -name "*.o" | xargs rm -rf
-*
+,*
!.gitignore
!.gitattributes
!nix/**
!*.nix
!flake.lock
!.envrc
+!.env
+!.env/**
!README
!COPYRIGHT
!CHANGELOG
@@ -75,17 +77,17 @@
!markup/pod/*/tools/po4a/po/*/*.ssm.po
!markup/pod/*/tools/po4a/po/*/*.ssi.po
.dub/**
-**/.dub/**
+,**/.dub/**
tmp/**
-*_.org
-*_.nix
-*_.d
-*_.txt
-*_
-*.swp
-*~
+,*_.org
+,*_.nix
+,*_.d
+,*_.txt
+,*_
+,*.swp
+,*~
\#*
-*.\#*
+,*.\#*
!.envrc-local_
#!*/
#\#*
@@ -99,6 +101,7 @@ tmp/**
#+BEGIN_SRC sh
/org export-ignore
.gitattributes export-ignore
-.gitignore export-ignore
+#.gitignore export-ignore
tangle export-ignore
+flake.lock export-ignore
#+END_SRC
diff --git a/org/config_nix.org b/org/config_nix.org
index 937a7f2..7e16bc4 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -38,37 +38,37 @@
use flake .
#use flake .#default
NIX_ENFORCE_PURITY=1
-NixDirEnvVersion="2.2.0"
+NixDirEnvVersion="2.2.1"
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
# - https://github.com/nix-community/nix-direnv
# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi
watch_file flake.lock
watch_file flake.nix
-nix flake update && nix flake check --show-trace && nix flake show
+#nix flake update && nix flake check --show-trace && nix flake show
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
fi
-echo "
-
-- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
-
-- nix build .#default --print-build-logs
-- nix build .#spine-dmd --print-build-logs
-- nix build .#spine-ldc --print-build-logs
-- nix build .#spine-gdc --print-build-logs
-
-nix-shell '<nixpkgs>' -A nix --pure
-
-nix run .#default --print-build-logs
-
-nix develop --build .#default --print-build-logs
-
-nix shell .#default --print-build-logs --command spine -v
-nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" ./markup/pod
-nix shell .#default --print-build-logs --command spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" ./markup/pod
-"
+# echo "
+#
+# - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+#
+# - nix build .#default --print-build-logs
+# - nix build .#spine-dmd --print-build-logs
+# - nix build .#spine-ldc --print-build-logs
+# - nix build .#spine-gdc --print-build-logs
+#
+# nix-shell '<nixpkgs>' -A nix --pure
+#
+# nix run .#default --print-build-logs
+#
+# nix develop --build .#default --print-build-logs
+#
+# nix shell .#default --print-build-logs --command spine -v
+# nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" ./markup/pod
+# nix shell .#default --print-build-logs --command spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" ./markup/pod
+# "
#+END_SRC
**** .envrc-local CHECK MODIFY
@@ -79,28 +79,21 @@ nix shell .#default --print-build-logs --command spine --very-verbose --html --h
#+HEADER: :noweb yes
#+BEGIN_SRC sh
PATH_add result/bin
-#path_add PATH result/bin
#export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
+#export NIX_PATH=/srv/nix/nixpkgs
#export NIX_PATH=nixpkgs=/srv/nix/nixpkgs
export DFLAGS="-O2 -inline -boundscheck=on -color=on"
-## load the flake devShell
-# eval "$(nix print-dev-env)"
-# echo $NIX_BUILD_TOP
-export Date=`date "+%Y%m%d"`
+#export SpineBIN=result/bin
+export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine
export SpineDOC=.
-#export SpineSRC=
-export SpineBIN=result/bin
-#export SpineDOC=
-export SpinePOD=$SpineDOC/markup/pod
export SpineOUT=/srv/www/spine
-export SpineDBpath=/srv/www/spine/sqlite
-#export SpineDBpath=/var/www/sqlite
+export SpineDBpath=/var/www/sqlite
+#export SpineDBpath=/srv/www/spine/sqlite
+export SpineCGIbin=/var/www/cgi/cgi-bin
export SpineSearchActionLocal='http://localhost/spine_search'
export SpineSearchActionRemote='https://sisudoc.org/spine_search'
export SpineCGIform='spine_search'
export SpineSQLdb='spine.search.db'
-#export PROG_VER_DECLARED="`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`"
-#direnv allow
#+END_SRC
*** flake :flake:
@@ -119,9 +112,11 @@ export SpineSQLdb='spine.search.db'
spine.inputs.nixpkgs.follows = "nixpkgs";
spine.flake = true;
};
- outputs = { self, nixpkgs, flake-utils, spine }:
+ outputs = { self, nixpkgs, flake-utils, spine } @inputs:
let
version = "<<spine_version_set>>";
+ shell = ./shell.nix; # ./default.nix;
+ devEnv = ./.envrc; # ./shell.nix; # ./default.nix;
supportedSystems = [ "x86_64-linux" ]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); # nixpkgs instantiated for supported system types.
@@ -136,10 +131,116 @@ export SpineSQLdb='spine.search.db'
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
devShells = forAllSystems (system:
- let pkgs = nixpkgsFor.${system};
+ let
+ pkgs = nixpkgsFor.${system};
+ shellHook = ''
+ export DFLAGS="-O2 -inline -boundscheck=on -color=on"
+ export Date=`date "+%Y%m%d"`
+ ### set local values in .envrc-local (or modify here if you must)
+ # export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine
+ # export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples
+ # export SpineOUT=/srv/www/spine
+ export SpineDBpath=/var/www/sqlite
+ # export SpineDBpath=/srv/www/spine/sqlite
+ export SpineSRC=$SpinePROJ/src
+ export SpineBIN=$SpinePROJ/result/bin
+ export SpinePOD=$SpineDOC/markup/pod
+ export SpineSearchActionLocal='http://localhost/spine_search'
+ export SpineSearchActionRemote='https://sisudoc.org/spine_search'
+ export SpineCGIform='spine_search'
+ export SpineSQLdb='spine.search.db'
+ export spineNixHelp="cat ./.env/nix-commands"
+ export spineTest="nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineHtml="spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineEpub="spine --very-verbose --epub --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineLatex="spine --very-verbose --latex --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spinePdf="spine --very-verbose --pdf --output=\"\$SpineOUT\" $SpinePOD/*"
+ export spineSqliteCreateDB="spine --very-verbose --sqlite-db-recreate --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\""
+ export spineSqlite="spine --very-verbose --sqlite-discrete --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ #export spineSqlite="spine --very-verbose --sqlite-update --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*"
+ '';
in with pkgs; {
- devShell = mkShell { buildInputs = [ git dub dmd ldc gdc sqlite ]; };
- });
+ devShell = mkShell rec {
+ name = "spine dev shell default";
+ inherit shell;
+ inherit devEnv;
+ #buildInputs = [ sqlite ];
+ #nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-epub = mkShell rec {
+ name = "spine dev shell for epub output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ epr
+ sigil
+ calibre #(suite includes: ebook-viewer)
+ foliate
+ ];
+ inherit shellHook;
+ };
+ devShell-html = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-latex-pdf = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ source-sans-pro
+ source-serif-pro
+ source-code-pro
+ texlive.combined.scheme-full
+ ];
+ inherit shellHook;
+ };
+ devShell-sqlite = mkShell rec {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ ];
+ inherit shellHook;
+ };
+ devShell-i18n = mkShell {
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ sqlite
+ dub dmd ldc gdc gnumake
+ perl534Packages.Po4a
+ ];
+ inherit shellHook;
+ };
+ });
};
}
#+END_SRC
@@ -168,6 +269,7 @@ export SpineSQLdb='spine.search.db'
- 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 develop --profile .#default --print-build-logs --command spine -v
- nix search --json 2>/dev/null |jq
- nix flake show
@@ -186,8 +288,8 @@ nix flake clone git+file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/
#+NAME: flake_inputs_nix
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-nixpkgs.url = "github:nixos/nixpkgs";
-flake-utils.url = "github:numtide/flake-utils";
+nixpkgs.url = "github:nixos/nixpkgs";
+flake-utils.url = "github:numtide/flake-utils";
#+END_SRC
#+NAME: flake_inputs_spine
@@ -382,7 +484,7 @@ mkShell {
nix shell .#default --print-build-logs --command spine -v
- nix develop
- nix develop --build .#default --print-build-logs
+ nix develop --build .#default --print-build-logs
nix develop --build -f derivation.nix -I .envrc --print-build-logs
nix develop ; eval \$buildPhase
@@ -399,106 +501,7 @@ mkShell {
}
#+END_SRC
-#+BEGIN_SRC nix
-{ pkgs ? import <nixpkgs> {} }:
-with pkgs;
-mkShell {
- buildInputs = [
- # ### nix_related
- # direnv
- # nixVersions.unstable #nixFlakes
- # nix-prefetch-git
- # validatePkgConfig
- # nix-tree jq nix-output-monitor
- # git
- # ps
- # ### d_build_related
- # ## package manager
- # dub
- # ## compiler
- # ldc
- # rund
- # ## linker
- # #lld
- # #mold
- # ## builder
- # #ninja
- # #meson
- # ### sqlite search related
- # sqlite
- # # ### pdf_latex_related
- # # source-sans-pro
- # # source-serif-pro
- # # source-code-pro
- # # texlive.combined.scheme-full
- # # ### xml_and_epub_related
- # # libxml2
- # # html-tidy
- # # xmlstarlet
- # # epubcheck
- # # ebook_tools
- # # epr
- # # sigil
- # # calibre #(suite includes: ebook-viewer)
- # # foliate
- # # ### i18n translation related
- # # perl534Packages.Po4a
- # ### candy
- # #starship
- ];
- shellHook = ''
- #if [[ -f ".envrc" ]]; then
- # source .envrc
- #fi
- #nix flake update
- #echo ""
- #echo "nix flake metadata:"
- #nix flake metadata
- #echo ""
- #echo "nix flake check:"
- #nix flake check
- #echo ""
- #echo "nix flake show:"
- #nix flake show
- echo "
- nix flake update
- nix flake metadata
- nix flake check
- nix flake show
-
- nix build or nix develop? (suggestions):
-
- - nix build
- nix build .#default --print-build-logs
- nix build .#default-tarball --print-build-logs
- nix build .#default-markup-samples --print-build-logs
- nix build --print-build-logs
- nix build .#default --print-build-logs |& nom
-
- - nix run
- nix run .#default --print-build-logs
- nix run default.nix --print-build-logs
-
- - nix shell
- nix shell --print-build-logs --command spine -v
-
- - nix develop
- nix develop --build .#default --print-build-logs
- nix develop --build -f derivation.nix -I .envrc --print-build-logs
- nix develop ; eval \$buildPhase
-
- nix-build |& nom
-
- spine -v
-
- nix-instantiate | nix show-derivation | jq
- nix-build . --no-out-link | xargs -o nix-tree
- nix-tree --derivation .#default
-
- "
- '';
-}
-#+END_SRC
+**** Notes
#+BEGIN_SRC text
#% Notes
@@ -548,11 +551,13 @@ mkShell {
# - nix build `nix-instantiate -I .envrc`
# - nix build -f default.nix && ./result/bin/spine -v && noti -t "spine build" -m "see ./result/bin/spine"
+ # - nix build .#default
# [ nix run ]
# - nix run default.nix --print-build-logs
# - nix run -I .envrc default.nix --print-build-logs
+ # - nix run .#default
# - nix-shell -I .envrc --pure
# - nix develop --build -f derivation.nix -I .envrc --print-build-logs
@@ -711,7 +716,7 @@ mkDubDerivation rec {
meta = with pkgs.lib; {
description = "A sisu like parser & document generator";
longDescription = ''
- A sisu like parser & document generator
+ a sisu like parser & document generator
'';
homepage = "https://sisudoc.org";
license = licenses.agpl3Plus;
@@ -804,3 +809,272 @@ github:nixos/nixpkgs
<<nixpkgs_path_local>>
#+END_SRC
+**** .env/echo-nixNote CHECK MODIFY
+
+#+HEADER: :tangle ../.env/nix-commands
+#+BEGIN_SRC text
+- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+
+- nix build .#default --print-build-logs
+- nix build .#spine-dmd --print-build-logs
+- nix build .#spine-ldc --print-build-logs
+- nix build .#spine-gdc --print-build-logs
+
+- nix develop
+ - nix develop .#devShell --print-build-logs
+ - nix develop .#devShell-html --print-build-logs
+ - nix develop .#devShell-epub --print-build-logs
+ - nix develop .#devShell-latex-pdf --print-build-logs
+ - nix develop .#devShell-sqlite --print-build-logs
+ - nix develop .#devShell-i18n --print-build-logs
+
+nix run .#default --print-build-logs
+
+nix develop --build .#default --print-build-logs
+
+nix-shell '<nixpkgs>' -A nix --pure
+#+END_SRC
+
+#+HEADER: :tangle ../.env/echo-nixNote
+#+BEGIN_SRC sh
+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-instantiate -I .envrc | nix-build -I .envrc
+nix build `nix-instantiate`
+nix build `nix-instantiate -I .envrc`
+
+nix develop
+
+nix-instantiate | nix show-derivation | jq
+nix-instantiate -I .envrc | nix show-derivation -f derivation.nix -I .envrc | jq
+
+nix-instantiate | nix show-derivation --recursive | jq
+nix-instantiate -I .envrc | nix show-derivation -f derivation.nix --recursive -I .envrc | 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
+SpineDOC=$SpineDOC
+SpinePOD=$SpinePOD
+SpineOUTversioned=$SpineOUTversioned
+SpineOUT=$SpineOUT
+,#+END_SRC
+" >> nixNote_.org
+
+echo '* spine run instruction examples
+,** parallelized tasks
+,*** doc source
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --pod --source --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** html & epub output
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --html --epub --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** sqlite db for each document - populate each db
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** doc source; html, epub; sqlite outputs
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** curate (authors topics)
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --curate --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** html, curate
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --dark --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
+$SpineBIN/spine --very-verbose --html --html-link-curate --curate --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** composite command: source pod, html, epub, curate, sqlite
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,** sequential tasks
+,*** sqlite db (shared) - create db
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTversioned"
+,#+END_SRC
+
+,*** sqlite db (shared) - populate db
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUTversioned" $SpineDOC/spine-markup-samples/markup/pod/*
+,#+END_SRC
+
+,*** sqlite db (shared) - drop db
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUTversioned"
+,#+END_SRC
+
+,*** sqlite db (shared) - create & populate db (single step)
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,*** composite command: source pod, html, epub, curate, sqlite
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-curate --curate --sqlite-discrete --output="$SpineOUTversioned" $SpinePOD/*
+,#+END_SRC
+
+,** config [./pod/].dr/config_local_site
+
+,#+BEGIN_SRC sh
+cat $SpinePOD/.dr/config_local_site
+$SpineBIN/spine --show-config $SpinePOD
+$SpineBIN/spine --show-config --output="$SpineOUTversioned" $SpinePOD
+,#+END_SRC
+
+,** cgi operations (output to $SpineOUT /var/www)
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" $SpinePOD/*
+
+$SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUT $SpinePOD/*
+
+$SpineBIN/spine -v --show-config --config=$SpinePOD/.dr
+
+$SpineBIN/spine --html $SpinePOD/*
+
+
+$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
+,#+END_SRC
+
+,*** generate html linked to search form
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --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-create --sqlite-db-filename="<<spine_search_db>>" --sqlite-db-path="$SpineDBpath"
+$SpineBIN/spine -v --sqlite-db-recreate --sqlite-db-filename="<<spine_search_db>>" --sqlite-db-path="$SpineDBpath"
+,#+END_SRC
+
+,*** populate sqlite db
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine -v --sqlite-update --sqlite-db-filename="<<spine_search_db>>" --output=$SpineOUT $SpinePOD/*
+,#+END_SRC
+
+,*** generate html (linked to search form), sql output, curate COMPOSITE
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="<<spine_search_db>>" --cgi-sqlite-search-filename="<<spine_search_cgi>>" --sqlite-db-path="$SpineDBpath" --output="$SpineOUT" $SpinePOD/*
+$SpineBIN/spine --epub --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename="spine.search.db" --cgi-sqlite-search-filename="spine_search" --cgi-url-action="https://sisudoc.org/spine_search" --ouput="$SpineOUT" $SpinePOD/*
+,#+END_SRC
+
+,*** generate html (linked to search form), sql output, curate COMPOSITE with resource configuration
+
+if names and paths are configured in resource configuration file, e.g. $SpinePOD/.rc/config_local_site
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine -v --html --html-link-search --html-link-curate --curate --sqlite-update $SpinePOD/*
+,#+END_SRC
+
+,#+BEGIN_SRC yaml
+# sample resource configuration file ( $SpinePOD/.rc/config_local_site )
+output:
+ path: "/srv/www/spine"
+default:
+ language: "en"
+ papersize: "a4"
+ text_wrap: "80"
+ digest: "sha256"
+webserv:
+ http: "http"
+ domain: "localhost"
+ data_http: "http"
+ data_domain: "localhost"
+ data_root_url: "https://sisudoc.org"
+ data_root_path: "/srv/www/spine"
+ images_root_part: "image"
+ cgi_search_form_title: "≅ SiSU Spine search"
+ cgi_http: "https"
+ cgi_domain: "sisudoc.org"
+ cgi_bin_url: "http://sisudoc.org/cgi-bin"
+ cgi_bin_part: "cgi-bin"
+ cgi_bin_path: "/var/www/cgi/cgi-bin"
+ cgi_search_script: "<<spine_search_cgi>>"
+ cgi_action: "https://sisudoc.org/spine_search"
+ db_sqlite_filename: "<<spine_search_db>>"
+ db_sqlite_path: "/var/www/sqlite"
+,#+END_SRC
+
+,*** make search form
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine -v --cgi-search-form-codegen --config=$SpinePOD/.dr/config_local_site
+,#+END_SRC
+
+,*** latex
+
+,#+BEGIN_SRC sh
+$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/*
+ls $SpineOutstatic/latex/*.tex
+,#+END_SRC
+' >> nixNote_.org
+
+#cat nixNote_.org
+
+#echo "emacs nixNote_.org"
+#echo "cat nixNote_.org"
+#+END_SRC
+
diff --git a/shell.nix b/shell.nix
index 517e9a2..7007e99 100755
--- a/shell.nix
+++ b/shell.nix
@@ -81,7 +81,7 @@ mkShell {
nix shell .#default --print-build-logs --command spine -v
- nix develop
- nix develop --build .#default --print-build-logs
+ nix develop --build .#default --print-build-logs
nix develop --build -f derivation.nix -I .envrc --print-build-logs
nix develop ; eval \$buildPhase