aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--makefile2
-rw-r--r--meson.build2
-rw-r--r--nix/pkglst/shell-pkgs.nix1
-rw-r--r--org/spine_build_scaffold.org119
-rwxr-xr-xproject.nix1
-rwxr-xr-xspine.nix1
6 files changed, 113 insertions, 13 deletions
diff --git a/makefile b/makefile
index 92791f7..40d1026 100644
--- a/makefile
+++ b/makefile
@@ -154,7 +154,7 @@ get_depends:
done; \
cd $${hwd}
set_depends: get_depends
- dub describe | sed 's_$(shell echo `pwd | sed 's_/_\\/_g'`)_._g' > dub_describe.json
+ dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
rm_flakelock:
git reset HEAD flake.lock && \
touch flake.lock \
diff --git a/meson.build b/meson.build
index 1c4b214..8f1c5d4 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,7 @@ source_root = meson.source_root()
src_dir = include_directories('src/')
# Dependencies
dep_tinyendian = dependency('tinyendian', version: '>= 0.2.0', fallback: ['tinyendian', 'tinyendian_dep'], method: 'dub')
-dep_dyaml = dependency('dyaml', version: '>= 0.8.0', fallback: ['dyaml', 'dyaml_dep'], method: 'dub')
+dep_dyaml = dependency('dyaml', version: '>= 0.8.3', fallback: ['dyaml', 'dyaml_dep'], method: 'dub')
dep_d2sqlite3 = dependency('d2sqlite3', version: '>= 0.19.1', fallback: ['d2sqlite3', 'd2sqlite3_dep'], method: 'dub')
dep_imageformats = dependency('imageformats', version: '>= 7.0.2', fallback: ['imageformats', 'imageformats_dep'], method: 'dub')
# Executable
diff --git a/nix/pkglst/shell-pkgs.nix b/nix/pkglst/shell-pkgs.nix
index 00259da..b11ae94 100644
--- a/nix/pkglst/shell-pkgs.nix
+++ b/nix/pkglst/shell-pkgs.nix
@@ -12,4 +12,5 @@ with pkgs; [
nix-prefetch-git
validatePkgConfig
jq
+ git
]
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index a6bbd72..9431d96 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -29,6 +29,7 @@
** subprojects
- d2sqlite3
+ https://code.dlang.org/packages/d2sqlite3
#+NAME: version_d2sqlite3
#+BEGIN_SRC sh
@@ -36,6 +37,7 @@
#+END_SRC
- imageformats
+ https://code.dlang.org/packages/imageformats
#+NAME: version_imageformats
#+BEGIN_SRC sh
@@ -43,13 +45,15 @@
#+END_SRC
- dyaml
+ https://code.dlang.org/packages/dyaml
#+NAME: version_dyaml
#+BEGIN_SRC sh
-0.8.0
+0.8.3
#+END_SRC
- tinyendian
+ https://code.dlang.org/packages/tinyendian
#+NAME: version_tinyendian
#+BEGIN_SRC sh
@@ -411,7 +415,7 @@ get_depends:
done; \
cd $${hwd}
set_depends: get_depends
- dub describe | sed 's_$(shell echo `pwd | sed 's_/_\\/_g'`)_._g' > dub_describe.json
+ dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json
rm_flakelock:
git reset HEAD flake.lock && \
touch flake.lock \
@@ -2172,19 +2176,101 @@ fi
- bespoke modify appropriately and generate if needed
#+BEGIN_SRC nix :tangle ../.envrc-local_
-export NIX_PATH=nixpkgs=<<nixpkgs_path>>
+export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
+#export NIX_PATH=nixpkgs=<<nixpkgs_path>>
## reload when these files change
watch_file flake.nix
# watch_file flake.lock
## load the flake devShell
eval "$(nix print-dev-env)"
# echo $NIX_BUILD_TOP
-echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`"
-export PROJ=<<project_path_local>>
-echo "PROJ=<<project_path_local>>"
-echo '$PROJ/doc-reform/result/bin/spine --very-verbose --pod --source --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
-echo '$PROJ/doc-reform/result/bin/spine --very-verbose --html --epub --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
-echo '$PROJ/doc-reform/result/bin/spine --very-verbose --sqlite-discrete --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
+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 SpineDOC=<<project_path_local_doc>>
+export SpineOUT=<<project_path_local_out>>
+
+echo '-*- mode: org -*-
+
+,* nixpkgs path?
+
+ eval "$(nix print-dev-env)"
+' > SHELL_NIX_NOTE_
+
+echo " <nixpkgs> == `nix-instantiate --find-file nixpkgs`" >> SHELL_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-instantiate | nix show-derivation | jq
+ nix-instantiate | nix show-derivation --recursive | 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 '
+,* initialised shell variables
+
+ SpineSRC=<<project_path_local_src>>
+ SpineDOC=<<project_path_local_doc>>
+ SpineOUT=<<project_path_local_out>>
+
+,* spine run instruction examples
+,** parallelized tasks
+
+ - doc source
+ $SpineSRC/result/bin/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/*
+
+ - sqlite db for each document - populate each db
+ $SpineSRC/result/bin/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/*
+
+ - harvest (authors topics)
+ $SpineSRC/result/bin/spine --very-verbose --harvest --output="$SpineOUT" $SpineDOC/markup/pod/*
+ $SpineSRC/result/bin/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/*
+
+,** sequential tasks
+
+ - sqlite db (shared) - create db
+ $SpineSRC/result/bin/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/*
+ - sqlite db (shared) - drop db
+ $SpineSRC/result/bin/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/*
+
+ - 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/*
+
+,** 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
+
+' >> SHELL_NIX_NOTE_
+cat SHELL_NIX_NOTE_
+
#+END_SRC
**** nixpkgs_path SETUP
@@ -2215,9 +2301,19 @@ echo '$PROJ/doc-reform/result/bin/spine --very-verbose --sqlite-discrete --outpu
- local path SET WARN
-#+NAME: project_path_local
+#+NAME: project_path_local_src
+#+BEGIN_SRC nix
+/grotto-ra/repo/git.repo/projects/project-spine/doc-reform
+#+END_SRC
+
+#+NAME: project_path_local_doc
+#+BEGIN_SRC nix
+/grotto-ra/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples
+#+END_SRC
+
+#+NAME: project_path_local_out
#+BEGIN_SRC nix
-/grotto-ra/repo/git.repo/projects/project-spine
+/tmp/spine/$SpineVER/www
#+END_SRC
** flake :flake:
@@ -2872,6 +2968,7 @@ sqlite
nix-prefetch-git
validatePkgConfig
jq
+git
#+END_SRC
* .gitignore :gitignore:
diff --git a/project.nix b/project.nix
index 7377bc6..bfd44fb 100755
--- a/project.nix
+++ b/project.nix
@@ -21,6 +21,7 @@ mkDubDerivation rec {
nix-prefetch-git
validatePkgConfig
jq
+ git
]
)
];
diff --git a/spine.nix b/spine.nix
index fa90ad9..cc45422 100755
--- a/spine.nix
+++ b/spine.nix
@@ -131,6 +131,7 @@ mkDubDerivation rec {
nix-prefetch-git
validatePkgConfig
jq
+ git
]
)
];