diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-02-21 18:56:06 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-02-24 22:19:43 -0500 |
commit | 89077febca032ff9990a163a8cdb7f3bc62c3954 (patch) | |
tree | c309f7a9d06cab67c4bedf4a39da82baabd3d730 /org | |
parent | nix .envrc, add ./result/bin path, flake.nix minor (diff) |
nix flake & build, temp. remove gdc
Diffstat (limited to 'org')
-rw-r--r-- | org/config_make.org | 485 | ||||
-rw-r--r-- | org/config_nix.org | 231 |
2 files changed, 290 insertions, 426 deletions
diff --git a/org/config_make.org b/org/config_make.org index ae41c51..7f952c3 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -49,9 +49,9 @@ $(SiSU_MARKUP_SAMPLES_FIND_PODS) | xargs # find data/sisudir/media/text -name *.ss[tm] | sort | xargs # Date := `date "+%Y%m%d"` -SpineBIN := "${SpineBIN}" # './result/bin' -SpineOUT := "${SpineOUT}" # '/srv/www/spine' -SpinePOD := "${SpinePOD}" # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod' +SpineBIN := "$${SpineBIN}" # './result/bin' +SpineOUT := "$${SpineOUT}" # '/srv/www/spine' +SpinePOD := "$${SpinePOD}" # '~/grotto/repo/git.repo/projects/doc-reform/data/markup/spine-samples/markup/pod' SpineSearchActionLocal := 'http://localhost/spine_search' SpineSearchActionRemote := 'https://sisudoc.org/spine_search' SpineCGIform := 'spine_search' @@ -60,29 +60,47 @@ hwd := `pwd` gwd := `pwd` + "/src/ext_depends" deps := "`ls -gx './src/ext_depends'`" dirs_loc := "`ls -gx '.'`" -#dirs := "`ls -gx ${gwd}`" +#dirs := "`ls -gx $${gwd}`" + +default: flake-check + +flake-check: + nix flake update; \ + nix flake check; \ + echo -e 'nix flake show ❯❯\n'; \ + nix flake show; \ + echo -e '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh\n'; \ + echo -e '❯❯ nix develop\n❯❯ nix develop -c zsh\n'; \ + echo -e '❯❯ nix build ".#spine-ldc" --print-build-logs |& nom\n❯❯ nix build ".#spine-dmd" --print-build-logs |& nom\n'; \ + echo -e '❯❯ make -s\n❯❯ make -s nix-build-ldc\n❯❯ make -s nix-build-dmd\n'; \ + echo -e '❯❯ make -s ldc\n❯❯ make -s dmd\n'; \ + echo -e '❯❯ $(DUB) --compiler=ldc2 --build=ldc2\n❯❯ $(DUB) --compiler=dmd --build=dmd\n'; nix-devshell: - echo -ne "\n- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell\n\n- nix build .#default --print-build-logs\n- nix build .#spine-dmd --print-build-logs\n- nix build .#spine-ldc --print-build-logs\n- nix build .#spine-gdc --print-build-logs\n\n"; \ - nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell + echo -ne '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"\n\n❯❯ nix build ".#default" --print-build-logs\n❯❯ nix build ".#spine-dmd" --print-build-logs\n❯❯ nix build ".#spine-ldc" --print-build-logs\n❯❯ nix build ".#spine-gdc" --print-build-logs\n\n'; \ + nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" + +# nix build +build: + nix-build nix-build-default: - nix build .#default --print-build-logs + nix build ".#default" --print-build-logs nix-build-dmd: - nix build .#spine-dmd --print-build-logs + nix build ".#spine-dmd" --print-build-logs nix-build-ldc: - nix build .#spine-ldc --print-build-logs + nix build ".#spine-ldc" --print-build-logs nix-build-gdc: - nix build .#spine-gdc --print-build-logs + nix build ".#spine-gdc" --print-build-logs commands: - rg --color=always -B1 "^[a-z]\w+:" makefile | less + rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page -cmd: - rg --color=always -B1 "^[a-z]\w+:" makefile | page +cmds: + rg --color=always -B1 "^[a-zA-Z_-]+:" makefile | page # tangle org files org-tangle: @@ -92,56 +110,56 @@ org-tangle: # epub output out-epub: - ${SpineBIN}/spine -v \ - --epub --output=${SpineOUT} ${SpinePOD}/* + $${SpineBIN}/spine -v \ + --epub --output=$${SpineOUT} $${SpinePOD}/* # html output with local search links out-html: - ${SpineBIN}/spine -v --generated-by \ + $${SpineBIN}/spine -v --generated-by \ --curate \ - --html --html-link-search --html-link-curate --cgi-url-action="${SpineSearchActionLocal}" \ - --output=${SpineOUT} ${SpinePOD}/* + --html --html-link-search --html-link-curate --cgi-url-action="$${SpineSearchActionLocal}" \ + --output=$${SpineOUT} $${SpinePOD}/* # latex output out-latex: - ${SpineBIN}/spine -v \ + $${SpineBIN}/spine -v \ --latex \ - --output=${SpineOUT} ${SpinePOD}/* + --output=$${SpineOUT} $${SpinePOD}/* # odf output out-odf: - ${SpineBIN}/spine -v \ + $${SpineBIN}/spine -v \ --odf \ - --output=${SpineOUT} ${SpinePOD}/* + --output=$${SpineOUT} $${SpinePOD}/* # sqlite output out-sqlite: - ${SpineBIN}/spine -v \ - --sqlite-update --sqlite-db-filename="${SpineSQLdb}" \ - --output=${SpineOUT} ${SpinePOD}/* + $${SpineBIN}/spine -v \ + --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ + --output=$${SpineOUT} $${SpinePOD}/* # generate markup sample output with local search links output-samples-local: - ${SpineBIN}/spine -v \ + $${SpineBIN}/spine -v \ --latex --latex-init \ --epub \ --html --html-link-search --html-link-pdf --html-link-curate --html-link-markup \ - --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionLocal}" \ + --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionLocal}" \ --curate \ - --sqlite-update --sqlite-db-filename="${SpineSQLdb}" \ - --output=${SpineOUT} ${SpinePOD}/* + --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ + --output=$${SpineOUT} $${SpinePOD}/* # generate markup sample output with remote search links output-samples-remote: - ${SpineBIN}/spine -v \ + $${SpineBIN}/spine -v \ --generated-by \ --latex --latex-init \ --epub \ --html --html-link-search --html-link-pdf --html-link-curate \ - --cgi-sqlite-search-filename="${SpineCGIform}" --cgi-url-action="${SpineSearchActionRemote}" \ + --cgi-sqlite-search-filename="$${SpineCGIform}" --cgi-url-action="$${SpineSearchActionRemote}" \ --curate \ - --sqlite-update --sqlite-db-filename="${SpineSQLdb}" \ - --output=${SpineOUT} ${SpinePOD}/* + --sqlite-update --sqlite-db-filename="$${SpineSQLdb}" \ + --output=$${SpineOUT} $${SpinePOD}/* # generate markup sample output with local search links output-samples: output-samples-local @@ -153,7 +171,7 @@ generate-output-remote: nix-build output-samples-remote generate-output-local: nix-build output-samples-local # preview org files vim -files-vim: +files-vi: fd --max-depth 6 --type file -g "*" | sort \ | fzf \ --preview='bat --color "always" {}' \ @@ -161,7 +179,7 @@ files-vim: --bind="enter:execute(nvim {})"; \ # preview org files emacs -files-emacs: +files-e: fd --max-depth 6 --type file -g "*" | sort \ | fzf \ --preview='bat --color "always" {}' \ @@ -169,7 +187,7 @@ files-emacs: --bind="enter:execute(emacsclient -nw -a -f {})"; \ # preview org files vim -org-vim: +org-v: cd ./org; \ fd --max-depth 5 --type file -g "*.org" | sort \ | fzf \ @@ -179,7 +197,7 @@ org-vim: cd - # preview org files emacs -org-emacs: +org-e: cd ./org; \ fd --max-depth 5 --type file -g "*.org" | sort \ | fzf \ @@ -188,100 +206,40 @@ org-emacs: --bind="enter:execute(emacsclient -nw -a -f {})"; \ cd - -## search org files (view in vim) -#org-v find: -# cd ./org; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(nvim -c \"silent! /${find}\" {1})"; \ -# cd - -# -## search org files (view in emacsclient) -#org-e find: -# cd ./org; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(emacsclient -nw -a -f {})"; \ -# cd - -# -## search tips.org files (view in emacs) -#org-E find: -# cd ./org; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(emacs {} &)"; \ -# cd - -# -## search for in directory specified (view in vim, uses rg & fzf) ["find" for emacs] -#sDir-v find dir: -# cd ${dir}; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(nvim -c \"silent! /${find}\" {1})"; \ -# cd - -# -## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] -#sDir-e find dir: -# cd ${dir}; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(emacsclient -nw -a -f {})"; \ -# cd - -# -## search for in directory specified (view in emacs, uses rg & fzf) ["search" for emacs] -#sDir-E find dir: -# cd ${dir}; \ -# rg --files-with-matches --no-messages "${find}" | \ -# fzf --multi --ansi --print0 \ -# --preview-window=right:66% \ -# --preview="rg --pretty --after-context 3 --before-context 2 -- \"${find}\" {}" \ -# --bind="enter:execute(emacs {} &)"; \ -# cd - - # show markup pod source selections markup: - ls -1 --color=always ${SpinePOD} - ls -1 -d --color=always ${SpinePOD}/*/ + ls -1 --color=always $${SpinePOD} + ls -1 -d --color=always $${SpinePOD}/*/ # show markup pod source tree markup-pod-tree: - exa -alT --git -I'.git|.dub|*_' --color=always -L5 ${SpinePOD} | less -R + exa -alT --git -I'.git|.dub|*_' --color=always -L5 $${SpinePOD} | less -R # show markup pod source tree tree-src-search-cgi: - exa -alT --git -I'*_' --color=always -L5 ${SpineSearchCGI}/src ${SpineSearchCGI}/views | less -R + exa -alT --git -I'*_' --color=always -L5 $${SpineSearchCGI}/src $${SpineSearchCGI}/views | less -R # show markup files markup-files: - cd ${SpinePOD}; \ + cd $${SpinePOD}; \ find . -type f -iname "*sst"; \ cd -; \ - echo ${SpinePOD} -# find ${SpinePOD}/. -type f -iname "*sst" + echo $${SpinePOD} +# find $${SpinePOD}/. -type f -iname "*sst" # preview markup files vim -markup-files-vim: - cd ${SpinePOD}; \ +markup-files-vi: + cd $${SpinePOD}; \ fd --max-depth 5 --type file -g "*.ss?" | sort \ | fzf \ --preview='bat --color "always" {}' \ --preview-window=right:66% \ - --bind="enter:execute(nvim {})"; \ + --bind="enter:execute(vim {})"; \ cd - # preview markup files emacs -markup-files-emacs: - cd ${SpinePOD}; \ +markup-files-e: + cd $${SpinePOD}; \ fd --max-depth 5 --type file -g "*.ss?" | sort \ | fzf \ --preview='bat --color "always" {}' \ @@ -301,88 +259,67 @@ markup-samples: markup-pod-samples markup-file-samples # markup samples pod manifests markup-pod-samples: - echo "${SpinePOD}"; \ - find ${SpinePOD} -name pod.manifest | sort + echo "$${SpinePOD}"; \ + find $${SpinePOD} -name pod.manifest | sort -#find ${SpinePOD} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:' +#find $${SpinePOD} -name pod.manifest | sed -E 's:.+?(([/][^/]+){2})$:\1:' # markup samples sst files markup-file-samples: - echo "${SpinePOD}"; \ - find ${SpinePOD} -name *.ss[tm] | sort - -# markup_dir_samples: -# find data/sisudir/media/text -name *.ss[tm] | sort - -# version_tag: -# echo "DRV=0.11.3; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ -# echo "git tag -f doc-reform_v0.11.3 -m\"doc-reform spine-0.11.3\" HEAD" + echo "$${SpinePOD}"; \ + find $${SpinePOD} -name *.ss[tm] | sort # archive spine output (www) spineWWWarchive: cd /srv/www ; \ - rm spine_output.${Date}.tar.bz2 ; \ - sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.${Date}.tar.bz2 ./spine ; \ + rm spine_output.$${Date}.tar.bz2 ; \ + sudo tar --exclude='./spine/latex' --exclude='./spine/pod' --exclude='./spine/*_' -cjf spine_output.$${Date}.tar.bz2 ./spine ; \ cd - # rsync archived spine output to Linode spineWWWrsyncLinode: - rsync -v /srv/www/spine_output.${Date}.tar.bz2 linode:./stage/. ; \ + rsync -v /srv/www/spine_output.$${Date}.tar.bz2 linode:./stage/. ; \ rsync -v /var/www/sqlite/spine.search.db linode:./stage/. ; \ - echo "tar -xf ../spine_output.${Date}.tar.bz2" + echo "tar -xf ../spine_output.$${Date}.tar.bz2" # get project external dependencies depends_get: dub upgrade; \ - cd ${gwd} && \ - echo "${dirs_loc}" && \ - for dir in ${dirs_loc}; do \ - if [[ -d ${dir} ]]; then \ - echo ${gwd}/${dir} && \ - if [[ "imageformats" == ${dir} ]]; then \ - echo ${gwd}/${dir} && \ - rm -rvf ${gwd}/${dir} && \ - git clone --depth=1 https://github.com/tjhann/${dir} && \ - cd ${dir} && \ + cd $${gwd} && \ + echo "$${dirs_loc}" && \ + for dir in $${dirs_loc}; do \ + if [[ -d $${dir} ]]; then \ + echo $${gwd}/$${dir} && \ + if [[ "imageformats" == $${dir} ]]; then \ + echo $${gwd}/$${dir} && \ + rm -rvf $${gwd}/$${dir} && \ + git clone --depth=1 https://github.com/tjhann/$${dir} && \ + cd $${dir} && \ echo $$PWD && \ - echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \ - echo "https://github.com/tjhann/${dir}" >> ../${dir}.meta && \ - echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \ - cd ${gwd} && \ - rm -rf ${gwd}/${dir}/.git; \ - elif [[ "d2sqlite3" == ${dir} || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \ - echo ${gwd}/${dir} && \ - rm -rvf ${gwd}/${dir} && \ - git clone --depth=1 https://github.com/dlang-community/${dir} && \ - cd ${gwd}/${dir} && \ - echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \ - echo "https://github.com/dlang-community/${dir}" >> ../${dir}.meta && \ - echo "Boost Software License 1.0 (BSL-1.0)" >> ../${dir}.meta && \ - cd ${gwd} && \ - rm -rf ${gwd}/${dir}/.git; \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \ + echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \ + cd $${gwd} && \ + rm -rf $${gwd}/$${dir}/.git; \ + elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ + echo $${gwd}/$${dir} && \ + rm -rvf $${gwd}/$${dir} && \ + git clone --depth=1 https://github.com/dlang-community/$${dir} && \ + cd $${gwd}/$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ + echo "Boost Software License 1.0 (BSL-1.0)" >> ../$${dir}.meta && \ + cd $${gwd} && \ + rm -rf $${gwd}/$${dir}/.git; \ fi; \ fi; \ done; \ - cd ${hwd} + cd $${hwd} # get and set project external dependencies depends_set: depends_get dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json -# markup_samples: -# find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \ -# find data/sisudir/media/text -name *.ss[tm] | sort -# -# markup_pod_samples: -# find data/pod -name pod.manifest | cut -f 1-3 -d / | sort -# -# markup_dir_samples: -# find data/sisudir/media/text -name *.ss[tm] | sort -# -version_tag: - echo "DRV=0.11.3; git tag -f doc-reform_v$$\{DRV} -m\"doc-reform $$\{DRV}\" HEAD" && \ - echo "git tag -f doc-reform_v0.11.3 -m\"doc-reform spine-0.11.3\" HEAD" - changelog_: git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" > CHANGELOG_ @@ -390,90 +327,53 @@ changelog_: changelog: git log --pretty=format:'---%+s %+as %ae%+h%d%+b' --no-merges | sed "/^\\s*$$/d" | sed "s/^---$$//" | sed "s/^\(\*\)\+/-/" | sed "s/ \+$$//" | sed "s/ \+$//" > CHANGELOG_ -#gitZip: -# git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \ -# echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" -# -## git archive project, produce current state .tar.gz -#gitArchive: -# git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \ -# echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" -# -## git archive project, produce current state .tar.gz -## gitArchive: -## git archive -v --format=tar --prefix="spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}/" HEAD | gzip > ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz && \ -## echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz" - # remove test tarball dir nixGitHEADtarballClean: if [ -d "./tarballGitHEAD" ]; then \ rm -rv ./tarballGitHEAD; \ fi; -## create test tarball -#nixGitHEADtarballTar: -# if [ ! -d "./tarballGitHEAD" ]; then \ -# mkdir ./tarballGitHEAD; \ -# fi; \ -# git archive -v --format=tar --prefix="spine-${PROG_VER_DECLARED}/" HEAD | \ -# gzip > ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz && \ -# cp -v ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz && \ -# echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz"; \ -# echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}.tar.gz" -# -## check test tarball -#nixGitHEADtarballCheck: -# nix flake check file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz; \ -# nix flake lock file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz; \ -# nix flake show file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz; - -## build test tarball -#nixGitHEADtarballBuild: -# echo "nix build file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs" -# nix build file://${hwd}/tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs -# #nix build "./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine" --print-build-logs - # clean create check & build test tarball nixGitHEADtarball: nixGitHEADtarballClean nixGitHEADtarballTar nixGitHEADtarballCheck nixGitHEADtarballBuild get_depends: hwd=$$(echo `pwd`) && \ - gwd="${hwd}/src/ext_depends" && \ - dirs=$$(echo `ls -gx ${gwd}`) && \ + gwd="$${hwd}/src/ext_depends" && \ + dirs=$$(echo `ls -gx $${gwd}`) && \ license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ - echo ${hwd} && \ - echo ${gwd} && \ - echo ${deps} && \ + echo $${hwd} && \ + echo $${gwd} && \ + echo $${deps} && \ dub upgrade; \ - cd ${gwd} && \ - for dir in ${deps}; do \ - if [ -d ${dir} ]; then \ - echo ${dir} && \ - if [ "imageformats" == ${dir} ]; then \ - echo ${dir} && \ - rm -rf ${dir} && \ - git clone --depth=1 https://github.com/tjhann/${dir} && \ - cd ${dir} && \ + cd $${gwd} && \ + for dir in $${deps}; do \ + if [ -d $${dir} ]; then \ + echo $${dir} && \ + if [ "imageformats" == $${dir} ]; then \ + echo $${dir} && \ + rm -rf $${dir} && \ + git clone --depth=1 https://github.com/tjhann/$${dir} && \ + cd $${dir} && \ echo $$PWD && \ - echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \ - echo "https://github.com/tjhann/${dir}" >> ../${dir}.meta && \ - echo "${license_bsl}" >> ../${dir}.meta && \ - cd ${gwd} && \ - rm -rf ${dir}/.git; \ - elif [[ "d2sqlite3" == ${dir} || "D-YAML" == ${dir} || "tinyendian" == ${dir} ]]; then \ - echo ${dir} && \ - rm -rf ${dir} && \ - git clone --depth=1 https://github.com/dlang-community/${dir} && \ - cd ${dir} && \ - echo "${dir} `git rev-parse HEAD | cut -c 1-8`" > ../${dir}.meta && \ - echo "https://github.com/dlang-community/${dir}" >> ../${dir}.meta && \ - echo "${license_bsl}" >> ../${dir}.meta && \ - cd ${gwd} && \ - rm -rf ${dir}/.git; \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ + cd $${gwd} && \ + rm -rf $${dir}/.git; \ + elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ + echo $${dir} && \ + rm -rf $${dir} && \ + git clone --depth=1 https://github.com/dlang-community/$${dir} && \ + cd $${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ + cd $${gwd} && \ + rm -rf $${dir}/.git; \ fi; \ fi; \ done; \ - cd ${hwd} + cd $${hwd} set_depends: get_depends dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json @@ -498,22 +398,17 @@ set_latest: set_depends flake_update rm_flakelock dub_upgrade: $(DUB) upgrade -default: ldc +dc: ldc + +compile: ldc all: dmd ldc gdc all_ver: dmd_ver ldc_ver gdc_ver -all_debug: dmd_debug gdc_debug ldc_debug - meson_clean_build_dir: rm -r build; mkdir build -meson_build: meson_clean_build_dir - meson --buildtype=debugoptimized build - ninja -C build - notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine' - meson_redo: meson_clean_build_dir meson_build meson_project_build_clean: clean skel tangle dub_upgrade meson_build @@ -524,49 +419,24 @@ all_clean: clean tangle dmd ldc gdc all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver -all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver - -all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver - dmd: dub_upgrade - $(DUB) --compiler=dmd --config=dmd --build=release-nobounds + $(DUB) --compiler=dmd --build=dmd --build=release-nobounds notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' -dmd_debug: - $(DUB) --compiler=dmd --config=dmd --build=debug - -## assumes git tags with program version -#dmd_ver: dub_upgrade -# $(DUB) --compiler=dmd --config=dmd-version -# mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd -# notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd' - dmd_clean_ver: clean tangle dmd_ver dmd_rel: expunge skel tangle - $(DUB) --compiler=dmd --config=spine-release + $(DUB) --compiler=dmd --build=spine-release dmd_rel_tangle: tangle - $(DUB) --compiler=dmd --config=spine-dmd + $(DUB) --compiler=dmd --build=spine-dmd dmd_rel_expunge_tangle: expunge skel tangle dmd_rel_tangle -dmd_debug_tangle: tangle - $(DUB) --compiler=dmd --config=spine-dmd-debug - gdc: dub_upgrade - $(DUB) --compiler=gdc --config=gdc + $(DUB) --compiler=gdc --build=gdc notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' -gdc_debug: - $(DUB) --compiler=gdc --config=gdc --build=debug - -## assumes git tags with program version -#gdc_ver: dub_upgrade -# $(DUB) --compiler=gdc --config=gdc-version -# mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc -# notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc' - gdc_clean_ver: clean tangle gdc_ver gdc_rel: expunge skel tangle @@ -577,16 +447,10 @@ gdc_rel_tangle: tangle gdc_rel_expunge_tangle: expunge skel tangle gdc_rel_tangle -gdc_debug_tangle: tangle - $(DUB) --compiler=gdc --config=spine-gdc-debug - ldc: dub_upgrade - $(DUB) --compiler=ldc2 --config=ldc --build=release + $(DUB) --compiler=ldc2 --build=ldc2 --build=release notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' -ldc_debug: - $(DUB) --compiler=ldc2 --config=ldc --build=debug - # assumes git tags with program version ldc_ver: dub_upgrade $(DUB) --compiler=ldc2 --config=ldc-version @@ -603,9 +467,6 @@ ldc_rel_tangle: tangle ldc_rel_expunge_tangle: expunge skel tangle ldc_rel_tangle -ldc_debug_tangle: tangle - $(DUB) --compiler=ldc2 --config=spine-ldc-debug - reinit: clean skel tangle skel: @@ -691,117 +552,117 @@ find_pods: $(SiSU_MARKUP_SAMPLES_FIND_PODS) testrun_find: - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual testrun_find_pod_source: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/spine-ldc -v --source \ + spine -v --source \ --output-dir=tmp/program_output_pod testrun_find_pod_pod: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/spine-ldc -v --pod \ + spine -v --pod \ --output-dir=tmp/program_output_pod testrun_find_pod_html: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/spine-ldc -v --html \ + spine -v --html \ --output-dir=tmp/program_output_pod testrun_find_pod_epub: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/spine-ldc -v --epub \ + spine -v --epub \ --output-dir=tmp/program_output_pod testrun_find_pod_all: $(SiSU_MARKUP_SAMPLES_PODS_FOUND) \ - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod testrun_paths: - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ data/pod/sisu-manual testrun_paths_pod_source: - ./bin/spine-ldc -v --source \ + spine -v --source \ --output-dir=tmp/program_output_pod \ ./markup/pod/* testrun_paths_pod_pod: - ./bin/spine-ldc -v --pod \ + spine -v --pod \ --output-dir=tmp/program_output_pod \ ./markup/pod/* testrun_paths_pod_html: - ./bin/spine-ldc -v --html \ + spine -v --html \ --output-dir=tmp/program_output_pod \ ./markup/pod/* testrun_paths_pod_epub: - ./bin/spine-ldc -v --epub \ + spine -v --epub \ --output-dir=tmp/program_output_pod \ ./markup/pod/* testrun_paths_pod_all: - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_pod \ ./markup/pod/* testrun_find_dir_source: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ - ./bin/spine-ldc -v --source \ + spine -v --source \ --output-dir=tmp/program_output_dir testrun_find_dir_pod: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ - ./bin/spine-ldc -v --pod \ + spine -v --pod \ --output-dir=tmp/program_output_dir testrun_find_dir_html: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ - ./bin/spine-ldc -v --html \ + spine -v --html \ --output-dir=tmp/program_output_dir testrun_find_dir_epub: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ - ./bin/spine-ldc -v --epub \ + spine -v --epub \ --output-dir=tmp/program_output_dir testrun_find_dir_all: $(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \ - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir testrun_filelist_dir_source: - ./bin/spine-ldc -v --source \ + spine -v --source \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) testrun_filelist_dir_pod: - ./bin/spine-ldc -v --pod \ + spine -v --pod \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) testrun_filelist_dir_html: - ./bin/spine-ldc -v --html \ + spine -v --html \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) testrun_filelist_dir_epub: - ./bin/spine-ldc -v --epub \ + spine -v --epub \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) testrun_filelist_dir_all: - ./bin/spine-ldc -v --source --html --epub --sqlite-discrete \ + spine -v --source --html --epub --sqlite-discrete \ --sqlite-create --sqlite-update \ --output-dir=tmp/program_output_dir \ $(SiSU_MARKUP_SAMPLES_DIR) @@ -844,9 +705,6 @@ tangle_maker: (org-babel-tangle) \ (kill-buffer)) '($$ORGFILES)))" 2>&1 -lorri_shell: - lorri shell - # nix-shell nix-shell: nix-shell -I .envrc @@ -856,7 +714,7 @@ nix-shell-pure: # nix-shell (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) nix-shell-updated: - nix-shell -I nixpkgs=/nixpkgs-ra/nixpkgs --pure + nix-shell -I nixpkgs=/srv/nix/nixpkgs --pure # shell.nix (with shebang) shell: @@ -898,7 +756,7 @@ _flake-show-derivation: nix show-derivation |jq; nix-develop: - nix develop -f default.nix -I nixpkgs=/nixpkgs-ra/nixpkgs + nix develop -f default.nix -I nixpkgs=/srv/nix/nixpkgs # nix flake show flake-show: _flake-show-package _flake-show-name _flake-show-derivation @@ -911,13 +769,9 @@ flake-build: _flake-show-name flake-reset-build: _flake-lock-reset _flake-show-name nix build --print-build-logs -# nix-build flake spine debug -flake-build-debug: - nix build --debug - # nix-build spine (with local tools, presumably latest dlang compiler & build tools (ldc & dub)) flake-build-use-tools-new: - nix build --print-build-logs -I nixpkgs=/nixpkgs-ra/nixpkgs + nix build --print-build-logs -I nixpkgs=/srv/nix/nixpkgs # tangle-build-flake flake-tangle-build: org-tangle flake-build @@ -937,7 +791,14 @@ flake-build-search: gitsnapshot: distclean tangle git commit -a -.PHONY : all build rebuild debug release \ +# markup_dir_samples: +# find data/sisudir/media/text -name *.ss[tm] | sort + +version_tag: + echo "DRV=<<spine_version_set>>; git tag -f doc-reform-markup-samples_v$$\{DRV} -m\"doc-reform markup-samples spine-$$\{DRV}\" HEAD"; \ + echo "git tag -f doc-reform-markup-samples_v<<spine_version_set>> -m\"doc-reform markup-samples spine-<<spine_version_set>>\" HEAD"; + +.PHONY : all build rebuild release \ distclean init \ tangle gitsnapshot #+END_SRC diff --git a/org/config_nix.org b/org/config_nix.org index d206b6d..896aaed 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -6,7 +6,7 @@ #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] #+COPYRIGHT: Copyright (C) 2015 - 2023 Ralph Amissah #+LANGUAGE: en -#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+STARTUP: show4levels hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code #+PROPERTY: header-args+ :noweb yes #+PROPERTY: header-args+ :results no @@ -38,38 +38,19 @@ use flake . #use flake .#default NIX_ENFORCE_PURITY=1 +# - https://github.com/nix-community/nix-direnv 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 -#nix flake update && nix flake check --show-trace && nix flake show +watch_file makefile if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi PATH_add result/bin -# 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 @@ -97,8 +78,7 @@ export SpineSQLdb='spine.search.db' #+END_SRC *** flake :flake: -**** flake static :flake:static: -***** flake.nix +**** flake.nix #+HEADER: :tangle ../flake.nix #+HEADER: :noweb yes @@ -127,9 +107,15 @@ export SpineSQLdb='spine.search.db' default = spine.packages.${system}.default; spine-dmd = spine.packages.${system}.spine-dmd; spine-ldc = spine.packages.${system}.spine-ldc; - spine-gdc = spine.packages.${system}.spine-gdc; + #spine-gdc = spine.packages.${system}.spine-gdc; #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000="; - }); + }); + apps = forAllSystems (system: { + default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/spine"; + }; + }); devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; @@ -160,24 +146,24 @@ export SpineSQLdb='spine.search.db' #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 rec { - name = "spine base dev shell"; + devShell = mkShell { + name = "spine base dev shell"; inherit shell; inherit devEnv; #buildInputs = [ sqlite ]; #nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; packages = [ - dub dmd ldc gdc gnumake sqlite + dub dmd ldc gnumake ]; inherit shellHook; }; - devShell-epub = mkShell rec { - name = "spine dev shell for epub output"; + devShell-epub = mkShell { + name = "spine dev shell for epub output"; inherit shell; inherit devEnv; - packages = [ - dub dmd ldc gdc gnumake + packages = [ + dub dmd ldc gnumake sqlite libxml2 html-tidy @@ -196,22 +182,22 @@ export SpineSQLdb='spine.search.db' ]; inherit shellHook; }; - devShell-html = mkShell rec { - name = "spine dev shell for latex & pdf output"; + devShell-html = mkShell { + name = "spine dev shell for latex & pdf output"; inherit shell; inherit devEnv; - packages = [ - dub dmd ldc gdc gnumake + packages = [ + dub dmd ldc gnumake sqlite ]; inherit shellHook; }; - devShell-latex-pdf = mkShell rec { - name = "spine dev shell for latex & pdf output"; + devShell-latex-pdf = mkShell { + name = "spine dev shell for latex & pdf output"; inherit shell; inherit devEnv; - packages = [ - dub dmd ldc gdc gnumake + packages = [ + dub dmd ldc gnumake sqlite source-sans-pro source-serif-pro @@ -220,21 +206,22 @@ export SpineSQLdb='spine.search.db' ]; inherit shellHook; }; - devShell-sqlite = mkShell rec { - name = "spine dev shell for latex & pdf output"; + devShell-sqlite = mkShell { + name = "spine dev shell for latex & pdf output"; inherit shell; inherit devEnv; - packages = [ - dub dmd ldc gdc gnumake + packages = [ + dub dmd ldc gnumake sqlite ]; inherit shellHook; }; devShell-i18n = mkShell { + name = "spine dev shell internationalization, po4a"; inherit shell; inherit devEnv; - packages = [ - dub dmd ldc gdc gnumake + packages = [ + dub dmd ldc gnumake sqlite perl534Packages.Po4a ]; @@ -408,7 +395,7 @@ inputs.spine.url = fetchTarball { with pkgs; mkShell { buildInputs = [ - ### nix_related + # ❯❯❯ nix_related # direnv # nixVersions.unstable #nixFlakes # nix-prefetch-git @@ -416,26 +403,26 @@ mkShell { # nix-tree jq nix-output-monitor # git # ps - ### d_build_related - ### package manager + # ❯❯❯ d_build_related + # ❯❯ package manager # dub - ### compiler + # ❯❯ compiler # ldc # rund - ### linker + # ❯❯ linker # #lld # #mold - ## builder + # ❯❯ builder # #ninja # #meson - ### sqlite search related - # sqlite - ### pdf_latex_related + # ❯❯❯ sqlite search related + #sqlite + # ❯❯❯ pdf_latex_related # source-sans-pro # source-serif-pro # source-code-pro # texlive.combined.scheme-full - ### xml_and_epub_related + # ❯❯❯ xml_and_epub_related # libxml2 # html-tidy # xmlstarlet @@ -445,59 +432,27 @@ mkShell { # sigil # calibre #(suite includes: ebook-viewer) # foliate - ### i18n translation related + # ❯❯❯ i18n translation related # perl534Packages.Po4a ]; 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 .#default --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 - - " + nix flake update + nix flake check + nix flake show + echo ' + shell.nix echo ❯❯ + + ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh + + ❯❯ nix develop + ❯❯ nix develop -c zsh + + ❯❯ nix build + ❯❯ nix build ".#default" --print-build-logs + ❯❯ nix build ".#spine-dmd" --print-build-logs |& nom + ❯❯ nix build ".#spine-ldc" --print-build-logs |& nom + ❯❯ nix build ".#spine-gdc" --print-build-logs |& nom + ' ''; } #+END_SRC @@ -579,7 +534,7 @@ mkShell { *** default.nix :default: - default.nix -I nixpkgs=<provide local nix path> - e.g. default.nix -I nixpkgs=/nixpkgs-ra/nixpkgs + 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>> @@ -606,7 +561,58 @@ nix develop --build -f derivation.nix -I .envrc --print-build-logs #+HEADER: :shebang "#!/usr/bin/env -S nix-build" #+BEGIN_SRC nix { pkgs ? import <nixpkgs> {} }: -pkgs.callPackage ./derivation.nix {} +pkgs.callPackage ./devenv.nix {} +#+END_SRC + +* devEnv + +nix profile install . + +#+HEADER: :tangle ../devenv.nix +#+HEADER: :tangle-mode (identity #o644) +#+BEGIN_SRC nix +{ pkgs ? import <nixpkgs> { }, name ? "user-env" }: +with pkgs; +buildEnv { + inherit name; + extraOutputsToInstall = [ "out" "man" "lib" ]; # to get all needed symlinks + paths = [ + # ❯❯❯ nix_related + #nix # if not on NixOS, this is needed + direnv + #cachix + nixVersions.unstable #nixFlakes + nix-prefetch-git + validatePkgConfig + nix-output-monitor + nix-tree + jq + git + gnumake + ps + # ❯❯❯ d_build_related + # ❯❯ package manager + dub + # ❯❯ compiler + dmd + ldc + # ❯❯❯ sqlite search related + sqlite + # this will create a script that will rebuild and upgrade your setup; using shell script syntax + (writeScriptBin "nix-rebuild" '' + #!${stdenv.shell} + cd <path-to-flake> || exit 1 + nix flake update + nix profile upgrade '.*' + '') + # puts in your root the nixpkgs version + (writeTextFile { + name = "nixpkgs-version"; + destination = "/nixpkgs-version"; + text = lib.version; + }) + ]; +} #+END_SRC *** derivation.nix :default: @@ -700,7 +706,7 @@ with ( ); mkDubDerivation rec { pname = "spine"; - version = "0.12.0"; + version = "<<spine_version_set>>"; zipfile = "<<spine_tarball_filename>>"; src = fetchTarball { #url = "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/tarball/${pname}-${version}.tar.gz"; @@ -710,10 +716,7 @@ mkDubDerivation rec { sha256 = "<<spine_tarball_sha256>>"; }; nativeBuildInputs = with pkgs; [ dub ldc ]; - buildInputs = with pkgs; [ - nixVersions.unstable #nixFlakes - sqlite - ]; + buildInputs = with pkgs; [ nixVersions.unstable sqlite ]; meta = with pkgs.lib; { description = "A sisu like parser & document generator"; longDescription = '' |