diff options
Diffstat (limited to 'org/spine_build_scaffold.org')
-rw-r--r-- | org/spine_build_scaffold.org | 199 |
1 files changed, 121 insertions, 78 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index f4d950e..a91caf1 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -614,14 +614,14 @@ skel: mkdir -p build; \ mkdir -p views; \ mkdir -p data; \ - mkdir -p misc/util/d/cgi/search/cgi-bin/src; \ - mkdir -p misc/util/d/tools/markup_conversion; \ - mkdir -p misc/editor-syntax-etc/emacs; \ - mkdir -p misc/editor-syntax-etc/vim/syntax; \ - mkdir -p misc/editor-syntax-etc/vim/colors; \ - mkdir -p misc/editor-syntax-etc/vim/ftplugin; \ - mkdir -p misc/editor-syntax-etc/vim/rc; \ - mkdir -p misc/editor-syntax-etc/vim/templates; \ + mkdir -p sundry/util/d/cgi/search/cgi-bin/src; \ + mkdir -p sundry/util/d/tools/markup_conversion; \ + mkdir -p sundry/editor-syntax-etc/emacs; \ + mkdir -p sundry/editor-syntax-etc/vim/syntax; \ + mkdir -p sundry/editor-syntax-etc/vim/colors; \ + mkdir -p sundry/editor-syntax-etc/vim/ftplugin; \ + mkdir -p sundry/editor-syntax-etc/vim/rc; \ + mkdir -p sundry/editor-syntax-etc/vim/templates; \ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/conf; \ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/io_in; \ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR)/io_out; \ @@ -649,14 +649,14 @@ expunge: distclean: expunge distclean_and_init: expunge mkdir -p views; \ - mkdir -p misc/util/d/cgi/search/cgi-bin/src; \ - mkdir -p misc/util/d/tools/markup_conversion; \ - mkdir -p misc/editor-syntax-etc/emacs; \ - mkdir -p misc/editor-syntax-etc/vim/syntax; \ - mkdir -p misc/editor-syntax-etc/vim/colors; \ - mkdir -p misc/editor-syntax-etc/vim/ftplugin; \ - mkdir -p misc/editor-syntax-etc/vim/rc; \ - mkdir -p misc/editor-syntax-etc/vim/templates; \ + mkdir -p sundry/util/d/cgi/search/cgi-bin/src; \ + mkdir -p sundry/util/d/tools/markup_conversion; \ + mkdir -p sundry/editor-syntax-etc/emacs; \ + mkdir -p sundry/editor-syntax-etc/vim/syntax; \ + mkdir -p sundry/editor-syntax-etc/vim/colors; \ + mkdir -p sundry/editor-syntax-etc/vim/ftplugin; \ + mkdir -p sundry/editor-syntax-etc/vim/rc; \ + mkdir -p sundry/editor-syntax-etc/vim/templates; \ mkdir -p $(PRG_SRCDIR)/$(PRG_NAME_DIR); \ mkdir -p $(PRG_BINDIR); #+END_SRC @@ -1200,7 +1200,8 @@ gitsnapshot: distclean tangle "sourcePaths": [ "./src/ext_depends/d2sqlite3/source" ], "configurations": [ { - "name": "with-lib", + "name": "d2sqlite3", + "d2sqlite3": "with-lib", "targetType": "library", "systemDependencies": "SQLite version >= 3.8.7", "libs": [ "sqlite3" ], @@ -2123,8 +2124,8 @@ fi #+HEADER: :tangle ../.envrc-local_ #+BEGIN_SRC sh -export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos -#export NIX_PATH=nixpkgs=<<nixpkgs_path>> +export NIX_PATH=<<nix_path_channel>> +#export NIX_PATH=<<nixpkgs_path_local>> ## reload when these files change use flake watch_file flake.nix @@ -2134,6 +2135,7 @@ 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=<<project_path_local_src>> +export SpineBIN=<<project_path_local_bin>> export SpineDOC=<<project_path_local_doc>> export SpineOUT=<<project_path_local_out>> export SpineOUTstatic=<<project_path_local_out_static>> @@ -2163,92 +2165,99 @@ echo ' nix-instantiate | nix show-derivation | jq nix-instantiate | nix show-derivation --recursive | jq + nix search --json 2>/dev/null |jq + ,* version and build info ' >> SHELL_NIX_NOTE_ echo " spine version (git) == $SpineVER" >> SHELL_NIX_NOTE_ echo " nix-instantiate == `nix-instantiate`" >> SHELL_NIX_NOTE_ -echo ' +echo " ,* initialised shell variables - SpineSRC=<<project_path_local_src>> - SpineDOC=<<project_path_local_doc>> - SpineOUT=<<project_path_local_out>> - SpineOUTstatic=<<project_path_local_out_static>> + SpineSRC=$SpineSRC + SpineDOC=$SpineDOC + SpineOUT=$SpineOUT + SpineOUTstatic=$SpineOUTstatic +" >> SHELL_NIX_NOTE_ -,* spine run instruction examples +echo '* spine run instruction examples ,** parallelized tasks - doc source - $SpineSRC/result/bin/spine --very-verbose --pod --source --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --pod --source --output="$SpineOUT" $SpineDOC/markup/pod/* - html & epub output - $SpineSRC/result/bin/spine --very-verbose --html --epub --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --html --epub --output="$SpineOUT" $SpineDOC/markup/pod/* - sqlite db for each document - populate each db - $SpineSRC/result/bin/spine --very-verbose --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* - doc source; html, epub; sqlite outputs - $SpineSRC/result/bin/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --verbose --pod --html --epub --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* - harvest (authors topics) - $SpineSRC/result/bin/spine --very-verbose --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* - html, harvest - $SpineSRC/result/bin/spine --verbose --dark --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine --very-verbose --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --verbose --dark --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --html --html-link-harvest --harvest --output="$SpineOUT" $SpineDOC/markup/pod/* - composite command: source pod, html, epub, harvest, sqlite - $SpineSRC/result/bin/spine --verbose --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --verbose --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* ,** sequential tasks - sqlite db (shared) - create db - $SpineSRC/result/bin/spine --very-verbose --sqlite-db-create --output="$SpineOUT" + $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUT" - sqlite db (shared) - populate db - $SpineSRC/result/bin/spine --very-verbose --sqlite-update --output="$SpineOUT" $SpineDOC/spine-markup-samples/markup/pod/* + $SpineBIN/spine --very-verbose --sqlite-update --output="$SpineOUT" $SpineDOC/spine-markup-samples/markup/pod/* - sqlite db (shared) - drop db - $SpineSRC/result/bin/spine --very-verbose --sqlite-db-drop --output="$SpineOUT" + $SpineBIN/spine --very-verbose --sqlite-db-drop --output="$SpineOUT" - sqlite db (shared) - create & populate db (single step) - $SpineSRC/result/bin/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --sqlite-db-create --sqlite-update --output="$SpineOUT" $SpineDOC/markup/pod/* - composite command: source pod, html, epub, harvest, sqlite - $SpineSRC/result/bin/spine --verbose --no-parallel --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* + $SpineBIN/spine --verbose --no-parallel --dark --pod --epub --html --html-link-harvest --harvest --sqlite-discrete --output="$SpineOUT" $SpineDOC/markup/pod/* -,** cgi operations (output to $SpineOUTstatic /var/www) +,** config [./pod/].dr/config_local_site cat $SpineDOC/markup/pod/.dr/config_local_site - $SpineSRC/result/bin/spine --show-config $SpineDOC/markup/pod - $SpineSRC/result/bin/spine --show-config --output="$SpineOUT" $SpineDOC/markup/pod + $SpineBIN/spine --show-config $SpineDOC/markup/pod + $SpineBIN/spine --show-config --output="$SpineOUT" $SpineDOC/markup/pod -,** cgi operations (output to /var/www) +,** cgi operations (output to $SpineOUTstatic /var/www) - $SpineSRC/result/bin/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/* + $SpineBIN/spine --very-verbose --sqlite-db-create --output="$SpineOUTstatic" $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic/html $SpineDOC/markup/pod/* + $SpineBIN/spine -v --cgi-search-form-codegen --output=$SpineOUTstatic $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --show-config --config=$SpineDOC/markup/pod/.dr + $SpineBIN/spine -v --show-config --config=$SpineDOC/markup/pod/.dr - $SpineSRC/result/bin/spine --html $SpineDOC/markup/pod/* + $SpineBIN/spine --html $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-filename="spine.search.db" --output="$SpineOUTstatic/html" $SpineDOC/markup/pod/* + $SpineBIN/spine -v --sqlite-db-create --sqlite-filename="spine.search.db" --output="$SpineOUTstatic" $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --sqlite-db-create --sqlite-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic/html $SpineDOC/markup/pod/* + $SpineBIN/spine -v --sqlite-db-create --sqlite-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/* + $SpineBIN/spine -v --sqlite-db-recreate --sqlite-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --sqlite-db-recreate --sqlite-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --output=$SpineOUTstatic/html $SpineDOC/markup/pod/* + $SpineBIN/spine -v --sqlite-update --sqlite-filename="spine.search.db" --output=$SpineOUTstatic $SpineDOC/markup/pod/* - $SpineSRC/result/bin/spine -v --sqlite-update --sqlite-filename="spine.search.db" --output=$SpineOUTstatic/html $SpineDOC/markup/pod/* + $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site - - make search form - $SpineSRC/result/bin/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site - generate html linked to search form - $SpineSRC/result/bin/spine -v --html --html-link-search --html-link-harvest --harvest --output=$SpineOUTstatic/html $SpineDOC/markup/pod/* + $SpineBIN/spine -v --html --html-link-search --html-link-harvest --harvest --output=$SpineOUTstatic $SpineDOC/markup/pod/* + + - populate sqlite db + $SpineBIN/spine -v --sqlite-db-recreate --sqlite-filename="spine.search.db" --cgi-sqlite-search-filename="spine-search" --sqlite-update --output=$SpineOUTstatic $SpineDOC/markup/pod/* + + - make search form + $SpineBIN/spine -v --cgi-search-form-codegen --config=$SpineDOC/markup/pod/.dr/config_local_site --output=$SpineOUTstatic ' >> SHELL_NIX_NOTE_ cat SHELL_NIX_NOTE_ echo "cat SHELL_NIX_NOTE_" - #+END_SRC **** nixpkgs_path SETUP @@ -2279,11 +2288,26 @@ echo "cat SHELL_NIX_NOTE_" - local path SET WARN +#+NAME: nix_path_channel +#+BEGIN_SRC nix +/nix/var/nix/profiles/per-user/root/channels/nixos +#+END_SRC + +#+NAME: nix_path_directory +#+BEGIN_SRC nix +nixpkgs=<<nixpkgs_path_local>> +#+END_SRC + #+NAME: project_path_local_src #+BEGIN_SRC nix /grotto-ra/repo/git.repo/projects/project-spine/doc-reform #+END_SRC +#+NAME: project_path_local_bin +#+BEGIN_SRC nix +<<project_path_local_src>>/result/bin +#+END_SRC + #+NAME: project_path_local_doc #+BEGIN_SRC nix /grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples @@ -2291,11 +2315,21 @@ echo "cat SHELL_NIX_NOTE_" #+NAME: project_path_local_out #+BEGIN_SRC nix +/srv/www/spine/$SpineVER +#+END_SRC + +#+NAME: project_path_local_out_ +#+BEGIN_SRC nix /tmp/spine/$SpineVER/www #+END_SRC #+NAME: project_path_local_out_static #+BEGIN_SRC nix +/srv/www/spine/static +#+END_SRC + +#+NAME: project_path_local_out_static_ +#+BEGIN_SRC nix /var/www #+END_SRC @@ -2315,13 +2349,22 @@ nix develop nix flake update +#+NAME: nixpkgs_url +#+BEGIN_SRC nix +github:nixos/nixpkgs +#+END_SRC + +#+BEGIN_SRC nix +<<nixpkgs_path_local>> +#+END_SRC + #+HEADER: :tangle ../flake.nix #+BEGIN_SRC nix { description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs"; + nixpkgs.url = "<<nixpkgs_url>>"; }; outputs = { self, nixpkgs, flake-utils }: let @@ -2346,7 +2389,7 @@ nix flake update description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs"; + nixpkgs.url = "<<nixpkgs_url>>"; d2sqlite3 = { url = "github:dlang-community/d2sqlite3"; flake = false; @@ -2388,7 +2431,7 @@ nix flake update description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs"; + nixpkgs.url = "<<nixpkgs_url>>"; # pkgs /nixpkgs-ra/nixpkgs {} #spine.url = "/grotto-ra/repo/git.repo/projects/project-spine/doc-reform"; #spine.url = "./."; @@ -2433,6 +2476,8 @@ nix flake update shell.nix -I .envrc shell.nix + nix develop + nix-build nix-build -I nixpkgs=<provide local nix path> nix-build -I .envrc @@ -2454,21 +2499,19 @@ nix flake update #+BEGIN_SRC nix { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { - buildInputs = with pkgs; [ - ( - with pkgs; [ - nixFlakes - rund - dub - ldc - sqlite - nix-prefetch-git - validatePkgConfig - jq - git - ] - ) - ]; + buildInputs = with pkgs; [( + with pkgs; [ + nixFlakes + rund + dub + ldc + sqlite + nix-prefetch-git + validatePkgConfig + jq + git + ] + )]; shellHook = '' if [[ -e ".envrc" ]]; then source .envrc @@ -2605,8 +2648,7 @@ mkDubDerivation rec { version = "<<version_spine>>"; src = ./.; buildInputs = [ - pkgs.sqlite - ( + pkgs.sqlite ( with pkgs; [ nixFlakes rund @@ -2747,7 +2789,8 @@ git * .gitignore :gitignore: -#+BEGIN_SRC sh :tangle ../.gitignore +#+HEADER: :tangle "../.gitignore" +#+BEGIN_SRC sh # git ls-files --others --exclude-from=.git/info/exclude ,* !.gitignore @@ -2769,8 +2812,8 @@ git !man !man/** !org -!misc -!misc/** +!sundry +!sundry/** !*.nix !nix !nix/** @@ -2822,7 +2865,7 @@ tmp/** #.reggae/** #+END_SRC -* misc +* sundry misc ** sh script to batch process _emacs org babel tangle_ :shell_script:tangle: [[https://orgmode.org/manual/Batch-execution.html]] creates a shell batch script called "tangle", that will tangle (emacs org |