aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/config_nix.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-09-13 11:26:46 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-09-13 11:26:46 -0400
commit59456d7b2c1e2a064989a455669737ccf3b3e2a9 (patch)
treeb0fb047524868266d5c5707d589e1f10c7bfdf8c /org/config_nix.org
parentorg, reorganize lib headers, (simplify managing) (diff)
org, nix config relatedHEADupstream
Diffstat (limited to 'org/config_nix.org')
-rw-r--r--org/config_nix.org115
1 files changed, 5 insertions, 110 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index ca7bfc12..200fe7f2 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -25,111 +25,6 @@
- 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
-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
-#+END_SRC
-
-*** .envrc-nix
-
-#+HEADER: :tangle ../.envrc-nix
-#+BEGIN_SRC sh
-NIX_ENFORCE_PURITY=1
-# - https://github.com/nix-community/nix-direnv
-#NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000="
-#direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc
-NixDirEnvVersion="2.4.0"
-NixDirEnvSHA="sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U="
-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 .envrc
-watch_file .envrc-local
-watch_file .envrc-nix
-nix_direnv_watch_file flake.nix
-nix_direnv_watch_file shell.nix
-nix_direnv_watch_file .envrc
-nix_direnv_watch_file .envrc-local
-nix_direnv_watch_file .envrc-nix
-#nix flake update
-#nix flake check
-echo ""
-PATH_add result/bin
-nix flake show
-#use flake .
-#+END_SRC
-
-*** .envrc-local CHECK MODIFY
-
-- bespoke modify appropriately and generate if needed
-
-#+HEADER: :tangle ../.envrc-local_
-#+HEADER: :noweb yes
-#+BEGIN_SRC sh
-export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
-#export NIX_PATH=nixpkgs=/nixpkgs-ra/nixpkgs
-## reload when these files change
-use flake
-watch_file flake.nix
-#eval "$(nix print-dev-env)"
-export sisuVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g')
-#export sisuBIN=bin
-export sisuSRC=~/grotto/repo/git.repo/projects/project-sisu/sisu
-export sisuDOC=~/grotto/repo/git.repo/projects/project-sisu/susu-markup/sisu-markup-samples/data/samples/current
-export sisuOUT=/var/www
-export sisuOUTver=/tmp/sisu/$sisuVER/www
-export RUBYLIB+=`pwd`/lib
-#+END_SRC
-
-#+BEGIN_SRC sh
- export Date=`date "+%Y%m%d"`
- export sisuver=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g')
- ### 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 sisuSRC=~/grotto/repo/git.repo/projects/project-sisu/sisu
- # export sisuDOC=~/grotto/repo/git.repo/projects/project-sisu/susu-markup/sisu-markup-samples/data/samples/current
- # export sisuOUT=/srv/www/sisu
- # export sisuOUTver=/srv/www/sisu/$sisuVER/www
- # 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/*"
-#+END_SRC
-
** flake :flake:
*** flake
**** flake.nix
@@ -147,7 +42,7 @@ export RUBYLIB+=`pwd`/lib
flake-utils,
} @ inputs: let
pname = "sisu";
- version = "<<sisu_version_set>>";
+ version = "<<sisu_project_version>>";
shell = ./shell.nix; # ./default.nix;
devEnv = ./shell.nix; # ./.envrc; # ./shell.nix; # ./default.nix;
supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
@@ -519,9 +414,9 @@ 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
-7.3.1
+#+NAME: sisu_project_version
+#+BEGIN_SRC emacs-lisp
+<<./sisu_version_info_and_doc_header_including_copyright_and_license.org:sisu_project_version()>>
#+END_SRC