aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2025-01-29 15:17:17 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2025-01-29 15:17:28 -0500
commita31b6c8270e141f09f56d52e5f11c80880573d25 (patch)
tree3deccb2f7a214b46b7225d39af6a079fef5671fb /org
parentnix flake check (diff)
sisu nix package/config updates, ruby on nix currentHEADupstream
- current is at ruby 3.3.6 - next is at ruby 3.4.1 - much tidying required - markup unaffected
Diffstat (limited to 'org')
-rw-r--r--org/config_env.org195
-rw-r--r--org/config_git.org12
-rw-r--r--org/config_nix.org1480
3 files changed, 413 insertions, 1274 deletions
diff --git a/org/config_env.org b/org/config_env.org
new file mode 100644
index 0000000..f481649
--- /dev/null
+++ b/org/config_env.org
@@ -0,0 +1,195 @@
+-*- mode: org -*-
+#+TITLE: sisudoc spine (doc_reform) (project) environment
+#+DESCRIPTION: env envrc used by make & nix
+#+FILETAGS: :spine:build:tools:
+#+AUTHOR: Ralph Amissah
+#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
+#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah
+#+LANGUAGE: en
+#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+PROPERTY: header-args :exports code
+#+PROPERTY: header-args+ :noweb yes
+#+PROPERTY: header-args+ :results no
+#+PROPERTY: header-args+ :cache no
+#+PROPERTY: header-args+ :padline no
+#+PROPERTY: header-args+ :mkdirp yes
+#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t
+
+- [[./doc-reform.org][doc-reform.org]] [[../org/][org/]]
+- [[./config_nix.org][config_nix.org]]
+- [[./config_make.org][config_make.org]]
+
+* envrc
+** nixDevEnv envrc :envrc:
+
+#+HEADER: :tangle ../nixDevEnv.sh
+#+BEGIN_SRC shell
+if [ -f .envrc ]; then
+ source_env_if_exists .envrc || source .envrc
+fi
+#+END_SRC
+
+* envrc :envrc:
+
+- https://github.com/nix-community/nix-direnv
+ - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
+
+** .envrc
+
+#+NAME: envrc
+#+HEADER: :tangle ../.envrc
+#+BEGIN_SRC shell
+if [ -f .envrc-git-init ]; then
+ source_env_if_exists .envrc-git-init || source .envrc-git-init
+fi
+if [ -f .envrc-local ]; then
+ source_env_if_exists .envrc-local || source .envrc-local
+fi
+if [ -f .envrc-nix ]; then
+ source_env_if_exists .envrc-nix || source .envrc-nix
+fi
+PATH_add result/bin
+#nix flake update && nix flake check --show-trace && nix flake show
+#+END_SRC
+
+** .envrc-nix
+
+- https://github.com/nix-community/nix-direnv
+ - source_url
+ - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv-sha>>"
+ - ${NixDirEnvVersion}
+
+#+HEADER: :tangle ../.envrc-nix
+#+BEGIN_SRC shell
+NIX_ENFORCE_PURITY=1
+# - https://github.com/nix-community/nix-direnv
+NixDirEnvVersion="3.0.6"
+NixDirEnvSHA="sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
+if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}"
+fi
+watch_file flake.lock
+watch_file flake.nix
+watch_file shell.nix
+watch_file makefile
+watch_file nixDevEnv.sh
+watch_file .envrc-local
+watch_file .envrc-nix
+PATH_add result/bin
+use flake .
+echo "
+• consider running:
+ ❯❯ nix flake show
+ ❯❯ nix flake update && nix flake check && nix flake show
+
+• for a dev shell (development environment):
+
+ ❯❯ nix develop
+ ❯❯ nix develop ".#" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+
+• to build project:
+
+ ❯❯ nix build ".#" --print-build-logs
+ - (see nix other/additional build options):
+ ❯❯ nix flake show
+"
+#+END_SRC
+
+*** 3.0.6
+
+#+NAME: direnv-version
+#+BEGIN_SRC shell
+3.0.6
+#+END_SRC
+
+#+NAME: direnv-sha
+#+BEGIN_SRC shell
+sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=
+#+END_SRC
+
+*** 3.0.4
+
+#+BEGIN_SRC shell
+3.0.4
+#+END_SRC
+
+#+BEGIN_SRC shell
+sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4=
+#+END_SRC
+
+*** 3.0.0
+
+#+BEGIN_SRC shell
+3.0.0
+#+END_SRC
+
+#+BEGIN_SRC shell
+sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg=
+#+END_SRC
+
+*** 2.4.0
+
+#+BEGIN_SRC shell
+2.4.0
+#+END_SRC
+
+#+BEGIN_SRC shell
+sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=
+#+END_SRC
+
+#+BEGIN_SRC shell
+2.3.0
+#+END_SRC
+
+#+BEGIN_SRC shell
+sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=
+#+END_SRC
+
+*** empty
+
+#+NAME: direnv-sha_
+#+BEGIN_SRC shell
+sha256-0000000000000000000000000000000000000000000=
+#+END_SRC
+
+#+BEGIN_SRC shell
+- https://github.com/nix-community/nix-direnv
+NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000="
+direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc
+#+END_SRC
+
+** .envrc-git-init
+
+#+HEADER: :tangle ../.envrc-git-init
+#+HEADER: :noweb yes
+#+BEGIN_SRC shell
+if [[ ! -d ./.git ]]; then
+ git init
+ git add .
+fi
+#+END_SRC
+
+** .envrc-local CHECK MODIFY
+
+- bespoke modify appropriately and generate if needed
+
+#+HEADER: :tangle ../.envrc-local_
+#+HEADER: :noweb yes
+#+BEGIN_SRC shell
+export SisuVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g')
+PATH_add result/bin
+#export sisuBIN=result/bin
+export sisuPROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/sisu
+export sisuDOC=./data/samples/current
+export sisuOUT=/srv/www/sisu
+#export sisuOUT=/var/www
+#export sisuOUTver=/tmp/sisu/$sisuVER/www
+export sisuCGIbin=/var/www/cgi/cgi-bin
+export sisuSearchActionLocal='http://localhost/sisu_search'
+export sisuSearchActionRemote='https://sisudoc.org/sisu_search'
+export sisuCGIform='sisu_search'
+export sisuSQLdb='spine.search.db'
+export sisuDBpath=/var/www/sqlite
+#export sisuDBpath=/srv/www/sisu/sqlite
+#+END_SRC
diff --git a/org/config_git.org b/org/config_git.org
index 44668c1..3772967 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -27,22 +27,19 @@
# git clean -ix
# find . -name "*_" | xargs rm -rf
,*
+!.gitignore
+!.gitattributes
!nix/**
!*.nix
!flake.lock
-!.envrc
-!.env
-!.env/**
!README
!COPYRIGHT
!CHANGELOG
!makefile
-!version.txt
!configuration.txt
!conf/
!conf/**
!*.json
-!tangle
!*.org
!org/
!org/*.org
@@ -73,8 +70,9 @@
!.gitignore
!.gitattributes
!.envrc
-!.env
-!.env/**
+!.envrc-local_
+!.envrc-nix
+!.envrc-git-init
#+END_SRC
** .gitattributes :gitattributes:
diff --git a/org/config_nix.org b/org/config_nix.org
index 6455b5a..4cc10b4 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -1,10 +1,10 @@
-*- mode: org -*-
#+TITLE: configuration nix
-#+DESCRIPTION: makefile for spine
-#+FILETAGS: :spine:build:tools:
+#+DESCRIPTION: configuration nix
+#+FILETAGS: :sisu:build:tools:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
-#+COPYRIGHT: Copyright (C) 2015 - 2023 Ralph Amissah
+#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah
#+LANGUAGE: en
#+STARTUP: content hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
@@ -22,542 +22,219 @@
/srv/nix/nixpkgs
#+END_SRC
-** spine
+* sisu
- default.nix
- shell.nix
-*** envrc :envrc:
-**** .envrc
-
-- https://github.com/nix-community/nix-direnv
- - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
-
-#+HEADER: :tangle ../.envrc
-#+BEGIN_SRC sh
-use flake .
-#use flake .#default
-NIX_ENFORCE_PURITY=1
-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-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
-fi
-watch_file flake.lock
-watch_file flake.nix
-if [ -f .envrc-local ]; then
- source_env_if_exists .envrc-local || source .envrc-local
-fi
-PATH_add result/bin
-#nix flake update && nix flake check --show-trace && nix flake show
-#+END_SRC
-
-**** .envrc-local CHECK MODIFY
-
-- bespoke modify appropriately and generate if needed
-
-#+HEADER: :tangle ../.envrc-local_
-#+HEADER: :noweb yes
-#+BEGIN_SRC sh
-PATH_add result/bin
-export DFLAGS="-O2 -inline -boundscheck=on -color=on"
-#export sisuBIN=result/bin
-export sisuPROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/sisu
-export sisuDOC=.
-export sisuDBpath=/var/www/sqlite
-#export sisuDBpath=/srv/www/sisu/sqlite
-export sisuOUT=/srv/www/sisu
-export sisuCGIbin=/var/www/cgi/cgi-bin
-export sisuSearchActionLocal='http://localhost/sisu_search'
-export sisuSearchActionRemote='https://sisudoc.org/sisu_search'
-export sisuCGIform='sisu_search'
-export sisuSQLdb='spine.search.db'
-#+END_SRC
-
-*** flake :flake:
-**** flake
-***** flake.nix
+** flake.nix
#+HEADER: :tangle ../flake.nix
#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
- description = "sisu parser & document generator";
- inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs";
- flake-utils.url = "github:numtide/flake-utils";
- sisu.url = "git://git.sisudoc.org/software/sisu";
- #git clone git://git.sisudoc.org/software/sisu
- sisu.inputs.nixpkgs.follows = "nixpkgs";
- sisu.flake = true;
- };
- outputs = { self, nixpkgs, flake-utils, sisu } @inputs:
- let
- version = "<<sisu_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.
+ description = "sisu parser & document generator";
+ inputs.nixpkgs.url = "<<nixpkgs_url>>";
+ inputs.sisu.url = "git://git.sisudoc.org/software/sisu";
+ #git clone git://git.sisudoc.org/software/sisu
+ inputs.sisu.inputs.nixpkgs.follows = "nixpkgs";
+ inputs.sisu.flake = true;
+ outputs = {
+ self,
+ nixpkgs,
+ sisu
+ } @ inputs: let
+ version = "<<sisu_version_set>>";
+ shell = ./shell.nix; # ./default.nix;
+ devEnv = ./.envrc; # ./.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.
+ in {
+ packages = forAllSystems (system: let
+ pkgs = nixpkgsFor.${system};
in {
- packages = forAllSystems (system:
- let pkgs = nixpkgsFor.${system};
- in {
- default = sisu.packages.${system}.default;
- #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
- });
- apps = forAllSystems (system: {
- default = {
- type = "app";
- program = "${self.packages.${system}.default}/bin/sisu";
+ default = sisu.packages.${system}.default;
+ #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
+ });
+ apps = forAllSystems (system: {
+ default = {
+ type = "app";
+ program = "${self.packages.${system}.default}/bin/sisu";
+ };
+ });
+ devShells = forAllSystems (system: let
+ pkgs = nixpkgsFor.${system};
+ shellHook = ''
+ export Date=`date "+%Y%m%d"`
+ ### set local values in .envrc-local (or modify here if you must)
+ # export sisuPROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/sisu
+ # export sisuDOC=~/grotto/repo/git.repo/projects/project-sisu/doc-reform-markup/sisu-markup-samples
+ # export sisu=/srv/www/sisu
+ # export sisu=/var/www/sqlite
+ # export sisu=/srv/www/sisu/sqlite
+ export sisu=$sisuPROJ/src
+ export sisu=$sisuPROJ/result/lib
+ export sisu=$sisuDOC/markup/pod
+ export sisu=$sisuOUT/$sisuVER
+ export sisu='http://localhost/sisu_search'
+ # export sisuSearchActionRemote='https://sisudoc.org/sisu_search'
+ export sisuCGIform='sisu_search'
+ export sisuSQLdb='sisusearch.db'
+ export PROG_VER_GIT="`git describe --long --tags | sed -e 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g'`"
+ export sisuNixHelp="cat ./.env/nix-commands"
+ export sisuTest="nix shell .#default --print-build-logs --command sisu --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$sisuOUT\" $sisuPOD/*"
+ export sisuHtml="sisu --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"sisu.search.db\" --cgi-sqlite-search-filename=\"sisu_search\" --sqlite-db-path=\"\$sisuDBpath\" --output=\"\$sisuOUT\" $sisuPOD/*"
+ export sisuEpub="sisu --very-verbose --epub --output=\"\$sisuOUT\" $sisuPOD/*"
+ export sisuLatex="sisu --very-verbose --latex --output=\"\$sisuOUT\" $sisuPOD/*"
+ export sisuPdf="sisu --very-verbose --pdf --output=\"\$sisuOUT\" $sisuPOD/*"
+ export sisuSqliteCreateDB="sisu --very-verbose --sqlite-db-recreate --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\""
+ export sisuSqlite="sisu --very-verbose --sqlite-discrete --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\" --output=\"\$sisuOUT\" $sisuPOD/*"
+ #export sisuSqlite="sisu --very-verbose --sqlite-update --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\" --output=\"\$sisuOUT\" $sisuPOD/*"
+ '';
+ in
+ with pkgs; {
+ dsh = mkShell {
+ name = "sisu dev base shell";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ dsh-epub = mkShell {
+ name = "sisu dev shell for epub output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ graphicsmagick
+ zip
+ unzip
+ xz
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ epr
+ sigil
+ calibre #(suite includes: ebook-viewer)
+ foliate
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ dsh-html = mkShell {
+ name = "sisu dev shell for html output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ graphicsmagick
+ zip
+ unzip
+ xz
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
};
- });
- devShells = forAllSystems (system:
- let
- pkgs = nixpkgsFor.${system};
- shellHook = ''
- export Date=`date "+%Y%m%d"`
- ### set local values in .envrc-local (or modify here if you must)
- # export sisuPROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/sisu
- # export sisuDOC=~/grotto/repo/git.repo/projects/project-sisu/doc-reform-markup/sisu-markup-samples
- # export sisu=/srv/www/sisu
- # export sisu=/var/www/sqlite
- # export sisu=/srv/www/sisu/sqlite
- export sisu=$sisuPROJ/src
- export sisu=$sisuPROJ/result/lib
- export sisu=$sisuDOC/markup/pod
- export sisu=$sisuOUT/$sisuVER
- export sisu='http://localhost/sisu_search'
- # export sisuSearchActionRemote='https://sisudoc.org/sisu_search'
- export sisuCGIform='sisu_search'
- export sisuSQLdb='sisusearch.db'
- export PROG_VER_GIT="`git describe --long --tags | sed -e 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g'`"
- 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'`"
- export sisuNixHelp="cat ./.env/nix-commands"
- export sisuTest="nix shell .#default --print-build-logs --command sisu --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$sisuOUT\" $sisuPOD/*"
- export sisuHtml="sisu --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"sisu.search.db\" --cgi-sqlite-search-filename=\"sisu_search\" --sqlite-db-path=\"\$sisuDBpath\" --output=\"\$sisuOUT\" $sisuPOD/*"
- export sisuEpub="sisu --very-verbose --epub --output=\"\$sisuOUT\" $sisuPOD/*"
- export sisuLatex="sisu --very-verbose --latex --output=\"\$sisuOUT\" $sisuPOD/*"
- export sisuPdf="sisu --very-verbose --pdf --output=\"\$sisuOUT\" $sisuPOD/*"
- export sisuSqliteCreateDB="sisu --very-verbose --sqlite-db-recreate --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\""
- export sisuSqlite="sisu --very-verbose --sqlite-discrete --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\" --output=\"\$sisuOUT\" $sisuPOD/*"
- #export sisuSqlite="sisu --very-verbose --sqlite-update --sqlite-db-path=\"$sisuDBpath\" --sqlite-db-filename=\"sisu.search.db\" --output=\"\$sisuOUT\" $sisuPOD/*"
- '';
- in with pkgs; {
- devShell = mkShell {
- name = "sisu dev shell default";
- inherit shell;
- inherit devEnv;
- packages = [ sqlite ];
- inherit shellHook;
- };
- devShell-epub = mkShell {
- name = "sisu dev shell for epub output";
- inherit shell;
- inherit devEnv;
- packages = [
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
- sqlite
- zip
- unzip
- xz
- libxml2
- html-tidy
- xmlstarlet
- epubcheck
- ebook_tools
- libxml2
- html-tidy
- xmlstarlet
- epubcheck
- ebook_tools
- epr
- sigil
- calibre #(suite includes: ebook-viewer)
- foliate
- nixFlakes
- validatePkgConfig
- jq
- git
- ];
- inherit shellHook;
- };
- devShell-html = mkShell {
- name = "sisu dev shell for latex & pdf output";
- inherit shell;
- inherit devEnv;
- packages = [
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
- sqlite
- zip
- unzip
- xz
- nixFlakes
- validatePkgConfig
- jq
- git
- ];
- inherit shellHook;
- };
- devShell-latex-pdf = mkShell {
- name = "sisu dev shell for latex & pdf output";
- inherit shell;
- inherit devEnv;
- packages = [
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
- sqlite
- zip
- unzip
- xz
- source-sans-pro
- source-serif-pro
- source-code-pro
- texlive.combined.scheme-full
- nixFlakes
- validatePkgConfig
- jq
- git
- ];
- inherit shellHook;
- };
- devShell-sqlite = mkShell {
- name = "sisu dev shell for latex & pdf output";
- inherit shell;
- inherit devEnv;
- packages = [
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
- sqlite
- zip
- unzip
- xz
- nixFlakes
- validatePkgConfig
- jq
- git
- ];
- inherit shellHook;
- };
- devShell-i18n = mkShell {
- name = "sisu dev shell internationalization, po4a";
- inherit shell;
- inherit devEnv;
- packages = [
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
- sqlite
- perl534Packages.Po4a
- nixFlakes
- validatePkgConfig
- jq
- git
- ];
- inherit shellHook;
- };
- });
+ dsh-latex-pdf = mkShell {
+ name = "sisu dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ graphicsmagick
+ zip
+ unzip
+ xz
+ source-sans-pro
+ source-serif-pro
+ source-code-pro
+ texliveFull # texliveTeTeX
+ noto-fonts
+ noto-fonts-cjk-sans
+ takao
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ dsh-sqlite = mkShell {
+ name = "sisu dev shell for sqlite3 output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ graphicsmagick
+ zip
+ unzip
+ xz
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ dsh-i18n = mkShell {
+ name = "sisu dev shell internationalization, po4a";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ <<ruby_current>>
+ sqlite
+ graphicsmagick
+ perl538Packages.Po4a
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ default = import ./shell.nix { inherit pkgs; };
+ });
};
}
#+END_SRC
*** flake :flake:
-**** notes?
-
-- flake.nix
- /srv/nix/nixpkgs
- ./shell.nix
- - shell.nix
- ./pkgs/shell-pkgs.nix
- - pkgs/shell-pkgs.nix
- - default.nix
- ./nix/dub.selections.nix #
- - dub.selections.nix
-
-- nix develop
-
-- nix flake update
-
-- nix shell -f default.nix --print-build-logs
-- nix shell -c default.nix
-
-- nix build `nix-instantiate`
-- 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
-- nix show-derivation
-
-# nix-instantiate | nix-build
-
-#nix flake update
-#nix flake check
-#nix flake show
-#nix develop
-#nix build .#default --print-build-logs
-
-#+BEGIN_SRC nix
-src = fetchTarball {
- url = "file:///[path]/$(pname)-$(version).tar.gz";
- sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
-};
-#+END_SRC
-
**** flake parts
-***** flake metadata
-
-#+NAME: flake_metadata
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-pname = "spine";
-version = "<<sisu_version_set>>";
-description = "a sisu like parser and document generator";
-#+END_SRC
-
-***** flake inputs
-****** flake inputs static
-
-#+NAME: flake_inputs_nix
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-nixpkgs.url = "github:nixos/nixpkgs";
-flake-utils.url = "github:numtide/flake-utils";
-#+END_SRC
-
-****** flake inputs for dub2nix
-
-#+NAME: flake_inputs_dub2nix
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-flake-utils.url = "github:numtide/flake-utils";
-nixpkgs.url = "github:nixos/nixpkgs";
-d2sqlite3-src = { url = "github:dlang-community/d2sqlite3"; flake = false; };
-tinyendian-src = { url = "github:kiith-sa/tinyendian"; flake = false; };
-dyaml-src = { url = "github:dlang-community/D-YAML"; flake = false; };
-imageformats-src = { url = "github:lgvz/imageformats"; flake = false; };
-dub2nix-src = { url = "github:lionello/dub2nix"; flake = false; };
-#+END_SRC
-
-***** flake outputs
-****** flake outputs static
-
-#+NAME: flake_outputs
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-self, nixpkgs, flake-utils
-#+END_SRC
-
-****** flake outputs for dub2nix
-
-#+NAME: flake_outputs_dub2nix
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-self, nixpkgs, flake-utils, dub2nix-src, d2sqlite3-src, tinyendian-src, dyaml-src, imageformats-src
-#+END_SRC
-
-***** flake devshells
-
-#+NAME: flake_devshells
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-devShells = forAllSystems (system:
- let pkgs = nixpkgsFor.${system};
- in {
- default = pkgs.mkShell {
- buildInputs = with pkgs; [ git dub dmd ldc sqlite ];
- };
-});
-#+END_SRC
-
-***** flake phases
-
-#+NAME: flake_phases
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-buildPhase = ''
- runHook preBuild
- HOME="$PWD"
- for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
- echo "- check for D compiler $DC_"
- DC=$(type -P $DC_ || echo "")
- if [ ! "$DC" == "" ]; then break; fi
- done
- if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
- echo "$DC_ used as D compiler to build $pname"
- dub build --compiler=$DC --build=$DC_ --combined --skip-registry=all
- runHook postBuild
-'';
-<<flake_phases_other_than_buildPhase>>
-#+END_SRC
-
-#+NAME: flake_phases_other_than_buildPhase
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-checkPhase = ''
- runHook preCheck
- dub test --combined --skip-registry=all
- runHook postCheck
-'';
-installPhase = ''
- runHook preInstall
- mkdir -p $out/bin
- install -m755 ./bin/spine $out/bin/spine
- runHook postInstall
-'';
-postInstall = ''
- echo `ls -la $out/bin/spine`
- echo "
- nix build or nix develop? (suggestions):
- - nix build
- nix build .#default --print-build-logs
- nix flake update; nix build .#default --print-build-logs
- nix build --print-build-logs
- - nix run
- nix run .#default --print-build-logs
- nix run default.nix --print-build-logs
- - nix shell
- nix shell .#default --print-build-logs --command spine -v
- - nix develop
- nix develop --profile .#default --print-build-logs --command spine -v
- nix develop ; eval \"$buildPhase\"
- nix develop --build -f derivation.nix -I .envrc --print-build-logs
- - nix profile install . --print-build-logs
- spine -v
- nix-instantiate | nix show-derivation | jq
- "
- $out/bin/spine -v
-'';
-#+END_SRC
-
-***** d-compiler (dmd ldc gdc)
-
-- dmd ldc gdc
-
-#+NAME: d-compiler
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-dmd
-#+END_SRC
-
-***** flake spine dub2nix
-
-#+NAME: flake_output_spine_dub2nix
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-packages.x86_64-linux.spine =
- let
- pkgs = import nixpkgs {
- system = "x86_64-linux";
- };
- #targetOf = package: "${package.targetPath or "."}/${package.targetName or package.name}";
- in
- pkgs.stdenv.mkDerivation {
- pname = "spine";
- version = "<<sisu_version_set>>";
- description = "a sisu like parser and document generator";
- inherit self;
- src = self;
- shell = ./shell.nix;
- <<flake_phases>>
- buildInputs = [ sqlite ];
- nativeBuildInputs = with pkgs; [ dub ldc ];
- };
-#+END_SRC
-
-***** flake misc
-
-#+BEGIN_SRC nix
-src = fetchTarball {
- url = "file:///[path]/$(pname)-$(version).tar.gz";
- sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
-};
-#+END_SRC
+***** ruby version
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-{
- description = "a sisu like parser & document generator";
- inputs = {
- flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "<<nixpkgs_url>>";
- };
- outputs = { self, nixpkgs, flake-utils }:
- let
- pkgs = nixpkgs.legacyPackages.x86_64-linux;
- in {
- packages.x86_64-linux.spine = pkgs.stdenv.mkDerivation {
- name = "spine";
- inherit self;
- src = self;
- shell = ./shell.nix;
- installPhase = ''
- install -m755 spine $out/bin/spine
- '';
- };
- defaultPackage.x86_64-linux = self.packages.x86_64-linux.spine;
- };
-}
+#+NAME: ruby_current
+#+BEGIN_SRC shell
+ruby<<ruby_version>>
+rubyPackages<<ruby_version>>.rake
+rubyPackages<<ruby_version>>.sqlite3
+rubyPackages<<ruby_version>>.thor
#+END_SRC
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-{
- description = "a sisu like document parser";
- inputs = {
- flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "<<nixpkgs_url>>";
- d2sqlite3 = {
- url = "github:dlang-community/d2sqlite3";
- flake = false;
- };
- tinyendian = {
- url = "github:kiith-sa/tinyendian";
- flake = false;
- };
- dyaml = {
- url = "github:dlang-community/D-YAML";
- flake = false;
- };
- imageformats = {
- url = "github:lgvz/imageformats";
- flake = false;
- };
- };
- outputs = { self, d2sqlite3, tinyendian, dyaml, imageformats, nixpkgs, flake-utils }:
- let
- pkgs = nixpkgs.legacyPackages.x86_64-linux;
- in {
- packages.x86_64-linux.spine = pkgs.stdenv.mkDerivation {
- name = "spine";
- inherit self;
- src = self;
- shell = ./shell.nix;
- installPhase = ''
- install -m755 spine $out/bin/spine
- '';
- };
- defaultPackage.x86_64-linux = self.packages.x86_64-linux.spine;
- };
-}
+#+NAME: ruby_version
+#+BEGIN_SRC shell
+_3_4
#+END_SRC
-*** shell.nix :shell:
-**** tangle
+** shell.nix :shell:
+*** tangle
#+HEADER: :tangle ../shell.nix
#+HEADER: :tangle-mode (identity #o755)
@@ -575,141 +252,17 @@ in pkgs.mkShell {
#rubyPackages.rake
#rubyPackages.sqlite3
#rubyPackages.thor
- ruby_3_1
- rubyPackages_3_1.rake
- rubyPackages_3_1.sqlite3
- rubyPackages_3_1.thor
+ <<ruby_current>>
sqlite
+ graphicsmagick
unzip
xz
zip
- #texlive-combined-full
+ #texliveFull # texliveTeTeX
];
}
#+END_SRC
-**** Notes
-
-#+BEGIN_SRC text
-#% Notes
-
-# - shell.nix -I .envrc
-# - shell.nix -I .envrc --pure
-
-# [ nix-shell ]
-
- # - nix-shell -I nixpkgs=/srv/nix/nixpkgs --pure
- # - nix-shell -p "with import /srv/nix/nixpkgs {}; ldc" --pure
- # - nix-shell -p "with import /srv/nix/nixpkgs {}; [dub ldc]" --pure
-
- # - nix-shell -p nixVersions.unstable #nixFlakes
- # - nix-shell -p nixFlakes --pure
- # - nix-shell -p nixFlakes --pure -p "with import /srv/nix/nixpkgs {}; [nix dub ldc git ps]"
- # - nix-shell shell.nix direnv: export +IN_NIX_SHELL
- # - nix-shell shell.nix
-
-# [ nix-build ]
-
- # - nix-build -I nixpkgs=/srv/nix/nixpkgs # --pure
- # - nix-build -I .envrc --pure
- # - nix-build default.nix -I .envrc && result/bin/spine -v
-
-# [ nix-instantiate ]
-
- # - 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-instantiate | nix-build
- # - nix-instantiate -I .envrc | nix-build -I .envrc
-
-# [ nix shell ]
-
- # - nix shell -c default.nix
- # - nix shell -f default.nix --print-build-logs
-
-# [ nix build ]
-
- # - nix build -I .envrc --print-build-logs
- # - nix build -f default.nix --print-build-logs
- # - nix build -f derivation.nix --print-build-logs
-
- # - nix build `nix-instantiate`
- # - 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
-
-# - nix-shell -p nixFlakes --pure -p "with import /srv/nix/nixpkgs {}; [nix dub ldc git ps]"
-# - nix-build
-# - nix build `nix-instantiate -I .envrc`
-
-# - nix develop --build -f default.nix -I .envrc
-
-# - nix-shell -I .envrc --pure
-# - nix-build default.nix -I .envrc && result/bin/spine -v
-
-# - nix shell -f default.nix --print-build-logs
-# - nix-instantiate -I .envrc | nix-build -I .envrc
-#+END_SRC
-
-#+BEGIN_SRC text
-#% Notes
-- nix-shell
-
-- shell.nix --pure
-- shell.nix --pure -I .envrc
-
-- nix-shell --pure -I nixpkgs=<<nixpkgs_local>>
-- nix-shell --pure -p "with import <<nixpkgs_local>> {}; ldc"
-- nix-shell --pure -p "with import /srv/nix/nixpkgs {}; [dub ldc]"
-
-- shell.nix direnv: export +IN_NIX_SHELL
-
-- nix-shell -p nixFlakes
-- nix-shell -p nixFlakes --pure
-- nix-shell -p nixFlakes --pure -p "with import /srv/nix/nixpkgs {}; [dub ldc]"
-
-- shell.nix -I .envrc
-- nix-shell -I nixpkgs=<provide local nix path>
-- nix-shell -I nixpkgs=<provide local nix path> --pure
-- shell.nix
-- nix-shell shell.nix --pure
-
-- nix shell -c default.nix
-
-- nix run default.nix --print-build-logs
-- nix run -I .envrc default.nix --print-build-logs
-
-- nix develop
-
-- nix-build -I nixpkgs=<provide local nix path>
-- nix-build -I .envrc
-
-- nix build -f default.nix --print-build-logs
-- nix build -f derivation.nix --print-build-logs
-- nix build -I .envrc --print-build-logs
-- nix shell -f default.nix --print-build-logs
-- nix develop --build -f derivation.nix -I .envrc --print-build-logs
-
-- buildPhase
-
-- nix build -f default.nix && noti
-- nix build -f default.nix && ./result/bin/spine -v && noti -t "spine build" -m "see ./result/bin/spine"
-- nix develop --build -f derivation.nix -I .envrc --print-build-logs
-
- ./result/bin/spine
-#+END_SRC
-
**** shell parts (packages)
***** packages nix related
@@ -725,229 +278,8 @@ git
ps
#+END_SRC
-***** packages d build related
-
-#+NAME: shell_packages_d_build_related
-#+BEGIN_SRC nix
-### d_build_related
-## package manager
-dub
-## compiler
-ldc
-rund
-## linker
-#lld
-#mold
-## builder
-#ninja
-#meson
-#+END_SRC
-
-***** packages tools
-
-#+NAME: shell_packages_tool_download
-#+BEGIN_SRC nix
-### tools
-#curl
-#wget
-aria
-#+END_SRC
-
-***** packages candy
-
-#+NAME: shell_packages_candy
-#+BEGIN_SRC nix
-### candy
-starship
-#+END_SRC
-
-***** packages search sqlite related
-
-#+NAME: shell_packages_search_related_sqlite
-#+BEGIN_SRC nix
-### sqlite search related
-sqlite
-#+END_SRC
-
-***** packages pdf latex related
-
-#+NAME: shell_packages_pdf_latex_related
-#+BEGIN_SRC nix
-### pdf_latex_related
-source-sans-pro
-source-serif-pro
-source-code-pro
-texlive.combined.scheme-full
-#+END_SRC
-
-***** packages xml epub related
-
-#+NAME: shell_packages_xml_and_epub_related
-#+BEGIN_SRC nix
-### xml_and_epub_related
-libxml2
-html-tidy
-xmlstarlet
-epubcheck
-ebook_tools
-epr
-sigil
-calibre #(suite includes: ebook-viewer)
-foliate
-#+END_SRC
-
-***** packages i18n_translation related
-
-#+NAME: shell_packages_i18n_translation
-#+BEGIN_SRC nix
-### i18n translation related
-perl534Packages.Po4a
-#+END_SRC
-
-*** default.nix :default:
-
-- default.nix -I nixpkgs=<provide local nix path>
- e.g. default.nix -I nixpkgs=/srv/nix/nixpkgs
-
-- nix-build -I nixpkgs=<provide local nix path>
- e.g. nix-build -I nixpkgs=<<nixpkgs_local>>
-
-#+HEADER: :noweb yes
-#+BEGIN_SRC sh
-nix-build -I nixpkgs=<<nixpkgs_local>>
-nix-build -I .envrc-local
-nix-build -I .envrc
-default.nix -I .envrc
-default.nix
-
-nix build -f default.nix --print-build-logs
-nix build -f derivation.nix --print-build-logs
-nix shell -f default.nix --print-build-logs
-nix develop --build -f derivation.nix -I .envrc --print-build-logs
-
-# nix build -f project.nix
-# nix build -f spine.nix
-#+END_SRC
-
-
-*** project meta
-
-#+NAME: nix_project_meta
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-meta = with pkgs.lib; {
- pname = "spine";
- version = "<<sisu_version_set>>";
- description = "a sisu like document parser";
- longDescription = ''
- A sisu like parser and document generator
- '';
- homepage = "https://sisudoc.org";
- license = licenses.agpl3Plus;
- platforms = platforms.linux;
- maintainers = [ "RalphAmissah" ];
-};
-#+END_SRC
-
-*** dub.selections.json
-
-#+HEADER: :NO-tangle ../dub.selections.json
-#+BEGIN_SRC nix
-{
- "fileVersion": 1,
- "versions": {
- "d2sqlite3": "0.19.1",
- "dyaml": "0.8.3",
- "imageformats": "7.0.2",
- "tinyendian": "0.2.0"
- }
-}
-#+END_SRC
-
-*** dub.selections.nix
-
-#+HEADER: :NO-tangle ../nix/dub.selections.nix
-#+BEGIN_SRC nix
-# This file was generated by https://github.com/lionello/dub2nix v0.2.3
-[ {
- fetch = {
- type = "git";
- url = "https://github.com/dlang-community/d2sqlite3.git";
- rev = "v0.19.1";
- sha256 = "0rnsgla6xyr8r34knf7v6dwhacra96q1b5rhxcz9246inwhvrk5k";
- fetchSubmodules = false;
- date = "2020-07-21T12:32:51+02:00";
- deepClone = false;
- leaveDotGit = false;
- path = "/nix/store/hsi8xvl15w6fwlqvs042m1z5i88yc72i-d2sqlite3";
- };
-} {
- fetch = {
- type = "git";
- url = "https://github.com/kiith-sa/tinyendian.git";
- rev = "v0.2.0";
- sha256 = "086gf5aga52wr5rj2paq54daj8lafn980x77b706vvvqaz2mlis8";
- fetchSubmodules = false;
- date = "2018-06-10T11:04:28+02:00";
- deepClone = false;
- leaveDotGit = false;
- path = "/nix/store/9c7fsmi5am84j6dq2mp3va306x3ay291-tinyendian";
- };
-} {
- fetch = {
- type = "git";
- url = "https://github.com/kiith-sa/D-YAML.git";
- rev = "v0.8.3";
- sha256 = "13wy304xjbwkpgg7ilql1lkxkm83s87jm59ffnrg26slp7cx149q";
- fetchSubmodules = false;
- date = "2020-09-19T23:46:57+02:00";
- deepClone = false;
- leaveDotGit = false;
- path = "/nix/store/3i8i56lkmw2xq3lxr5h66v909waq2mqg-D-YAML";
- };
-} {
- fetch = {
- type = "git";
- url = "https://github.com/lgvz/imageformats.git";
- rev = "v7.0.2";
- sha256 = "1mfbsmi4fs1xny4zqs6jyr04d5f4h03r9f6jadvkdqj5kd1k0ws7";
- fetchSubmodules = false;
- date = "2019-10-10T07:54:45+03:00";
- deepClone = false;
- leaveDotGit = false;
- path = "/nix/store/wn554pn21nzmpvw2hs7hvv9v9y0sgarg-imageformats";
- };
-} ]
-#+END_SRC
-
-*** dub2nix & shared pkgs SHARED
-**** dub2nix with pkgs shared
-
-#+NAME: nix_with_pkgs
-#+HEADER: :noweb yes
-#+BEGIN_SRC nix
-with pkgs; [
- <<nix_shell_with_pkgs_list>>
-]
-#+END_SRC
-
-**** with pkgs list
-
-#+NAME: nix_shell_with_pkgs_list
-#+BEGIN_SRC nix
-nixVersions.unstable #nixFlakes
-rund
-dub
-ldc
-sqlite
-nix-prefetch-git
-validatePkgConfig
-jq
-git
-#+END_SRC
-
** variables
-*** spine version SET VERSION :version:set:project:
+*** sisu version SET VERSION :version:set:project:
#+NAME: sisu_version_set
#+BEGIN_SRC sh
@@ -956,14 +288,14 @@ git
*** set names SET
-#+NAME: spine_search_db
+#+NAME: sisu_search_db
#+BEGIN_SRC sh
-spine.search.db
+sisu.search.db
#+END_SRC
-#+NAME: spine_search_cgi
+#+NAME: sisu_search_cgi
#+BEGIN_SRC sh
-spine_search
+sisu_search
#+END_SRC
*** nixpkgs_path SETUP
@@ -994,13 +326,13 @@ nixpkgs=<<nixpkgs_path_local>>
#+NAME: project_path_local_project
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-~/grotto/repo/git.repo/projects/project-spine/doc-reform
+~/grotto/repo/git.repo/projects/project-sisu/sisu
#+END_SRC
#+NAME: project_path_local_src
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-<<project_path_local_project>>/src
+<<project_path_local_project>>/lib
#+END_SRC
#+NAME: project_path_local_bin
@@ -1016,24 +348,24 @@ nixpkgs=<<nixpkgs_path_local>>
#+NAME: project_path_local_doc
#+BEGIN_SRC nix
-~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples
+~/grotto/repo/git.repo/projects/project-sisu/sisu-markup/sisu-markup-samples
#+END_SRC
#+NAME: project_path_local_out
#+BEGIN_SRC nix
-/srv/www/spine/$SpineVER
+/srv/www/sisu
#+END_SRC
#+NAME: project_path_local_out_
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-/tmp/spine/$SpineVER/www
+/tmp/sisu/$SisuVER/www
#+END_SRC
#+NAME: project_path_local_out_static
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-/srv/www/spine
+/srv/www/sisu
#+END_SRC
#+NAME: project_path_local_out_static_
@@ -1048,6 +380,10 @@ nixpkgs=<<nixpkgs_path_local>>
#+NAME: nixpkgs_url
#+BEGIN_SRC nix
+github:NixOS/nixpkgs/nixpkgs-unstable
+#+END_SRC
+
+#+BEGIN_SRC nix
github:nixos/nixpkgs
#+END_SRC
@@ -1063,15 +399,6 @@ github:nixos/nixpkgs
/srv/nix/nixpkgs
#+END_SRC
-**** project path options
-
-- local path SET WARN
-
-#+NAME: nix_path_channel
-#+BEGIN_SRC nix
-/nix/var/nix/profiles/per-user/root/channels/nixos
-#+END_SRC
-
** texlive xetex xelatex shell.nix
*** shell.nix :shell:
@@ -1092,7 +419,7 @@ pkgs.mkShell {
#(texlive.combine {
# inherit (texlive) scheme-tetex xetex fontspec footmisc multirow titlesec listings anysize float graphics helvetic times courier;
#})
- texlive.combined.scheme-full
+ texliveFull # texliveTeTeX
dejavu_fonts dejavu_fontsEnv
liberation_ttf
evince
@@ -1111,384 +438,3 @@ pkgs.mkShell {
'';
}
#+END_SRC
-
-*** notes
-
-#+BEGIN_SRC sh
-nix-shell --run 'which xetex'
-echo 'for texfile in *.tex; do echo "* --> " ~ $texfile && xelatex -interaction=batchmode $texfile; rm *.aux *.log *.toc *.out; done'
-
-$SpineBIN/spine --latex --serial --output="$SpineOUT" $SpinePOD/* && for texfile in $SpineOUT/latex/*.tex; do xelatex -interaction=nonstopmode $texfile; done 2>&1 | tee _err.xelatex_.org; ls $SpineOUT/latex/*.{tex,pdf}
-
-/run/current-system/sw/share/X11/fonts/
-
-kpsewhich pdftexconfig.tex
-/nix/store/2r4qa8rbll085nmpx56jg1rbmbir1zkp-texlive-combined-2021/share/texmf/tex/generic/tex-ini-files/pdftexconfig.tex
-/nix/store/2r4qa8rbll085nmpx56jg1rbmbir1zkp-texlive-combined-2021/share/texmf/fonts/opentype/public/
-
-find: texclive-fonts.conf
-fc-cache && mkfontscale && mkfontdir
-
-fc-match LiberationSans
-
-cd /nix/var/nix/profiles/system/sw/share/X11/fonts
-fc-query LiberationSans-Regular.ttf | grep '^\s\+family:' | cut -d'"' -f2
-Liberation Sans
-fc-query LiberationMono-Regular.ttf | grep '^\s\+family:' | cut -d'"' -f2
-Liberation Mono
-
-fc-query DejaVuSans.ttf | grep '^\s\+family:' | cut -d'"' -f2
-
-$XDG_DATA_HOME/fonts
-~/.local/share/fonts
-#+END_SRC
-
-** NOTES
-*** nix-shell
-
-- default.nix
-
-#+BEGIN_SRC sh
-nix-shell
-nix-build
-#+END_SRC
-
-- project.nix
-
-#+BEGIN_SRC sh
-nix-shell
-nix-build project.nix
-#+END_SRC
-
-*** nix-shell --pure
-
-- default.nix
-
-#+HEADER: :noweb yes
-#+BEGIN_SRC sh
-nix-shell --pure
-nix-build -I nixpkgs=<<nixpkgs_local>>
-nix-build -I .envrc
-#+END_SRC
-
-#+BEGIN_SRC sh
-nix build -f default.nix --print-build-logs
-nix build -f derivation.nix --print-build-logs
-nix shell -f default.nix --print-build-logs
-# nix build -f project.nix
-# nix build -f spine.nix
-nix develop --build -f derivation.nix -I .envrc --print-build-logs
-nix develop --profile .#default --print-build-logs --command spine -v
-#+END_SRC
-
-*** derivation .drv
-
-#+BEGIN_SRC sh
-nix show-derivation /nix/store/q7n14bm8j5vzm62qaraczdb4bpyf59vv-spine-0.11.1.drv
-#+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
-
-*** makefile
-
-#+HEADER: :tangle-NO ../makefile_
-#+BEGIN_SRC make
-buildPhase:
- HOME=$${PWD}; \
- for DC_ in dmd ldmd2 gdmd; do \
- echo "- check for D compiler $${DC_}"; \
- DC=$$(type -P $${DC_} || echo ""); \
- if [ ! "$${DC}" == "" ]; then \
- break; \
- fi; \
- done; \
- echo "D compiler = $${DC}"; \
- if [ "$${DC}" == "" ]; then \
- echo "Error: could not find D compiler"; \
- exit 1; \
- fi; \
- echo "$${DC_} used as D compiler to build $${pname}"; \
- export DFLAGS="-O2 -inline"; \
- dub build --compiler=$${DC} --build=release --combined --skip-registry=all;
-checkPhase:
- runHook preCheck; \
- HOME=$${PWD}; \
- dub test --combined --skip-registry=all; \
- runHook postCheck
-installPhase:
- runHook preInstall; \
- mkdir -p $${out}/bin; \
- install -m755 ./bin/spine $${out}/bin/spine; \
- runHook postInstall
- #cp -r bin/spine $out/bin/.
-postInstall:
- echo "$${out}/share/cgi-bin"; \
- echo `ls -la $${out}/bin/spine`
-#+END_SRC