From d7930ad07cb9e511928b13e8d37015a56b6341b4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 29 Apr 2023 19:08:52 -0400 Subject: nix dev + update direnv 2.2.1 => 2.3.0 --- org/config_nix.org | 110 +++++++---------------------------------------------- 1 file changed, 14 insertions(+), 96 deletions(-) (limited to 'org/config_nix.org') diff --git a/org/config_nix.org b/org/config_nix.org index e57d8e6..a12a04f 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -16,59 +16,6 @@ #+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t * nix :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 -NIX_ENFORCE_PURITY=1 -# - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="2.2.1" -NixDirEnvSHA="sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" -#NixDirEnvSHAget="sha256-0000000000000000000000000000000000000000000=" -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 makefile -#if [ -f .envrc-local ]; then -# source_env_if_exists .envrc-local || source .envrc-local -#fi -PATH_add result/bin -use flake . -#use flake .#default -#+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=/srv/nix/nixpkgs -#export NIX_PATH=nixpkgs=/srv/nix/nixpkgs -export DFLAGS="-O2 -inline -boundscheck=on -color=on" -export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') -#export SpineBIN=result/bin -export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine -export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples -export SpineOUT=/srv/www/spine -export SpineOUTversioned=/srv/www/spine/$SpineVER -export SpineDBpath=/var/www/sqlite -#export SpineDBpath=/srv/www/spine/sqlite -export SpineCGIbin=/var/www/cgi/cgi-bin -export SpineSearchActionLocal='http://localhost/spine_search' -export SpineSearchActionRemote='https://sisudoc.org/spine_search' -export SpineCGIform='spine_search' -export SpineSQLdb='spine.search.db' -#+END_SRC - ** flake.nix :flake: #+HEADER: :tangle ../flake.nix @@ -206,32 +153,6 @@ export SpineSQLdb='spine.search.db' shellHook = '' export DFLAGS="-O2 -inline -boundscheck=on -color=on" export Date=`date "+%Y%m%d"` - export SpineVER=$(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 SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine - # export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples - # export SpineOUT=/srv/www/spine - # export SpineDBpath=/var/www/sqlite - # export SpineDBpath=/srv/www/spine/sqlite - export SpineSRC=$SpinePROJ/src - export SpineBIN=$SpinePROJ/result/bin - export SpinePOD=$SpineDOC/markup/pod - export SpineOUTversioned=$SpineOUT/$SpineVER - export SpineSearchActionLocal='http://localhost/spine_search' - # export SpineSearchActionRemote='https://sisudoc.org/spine_search' - export SpineCGIform='spine_search' - export SpineSQLdb='spine.search.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 spineNixHelp="cat ./.env/nix-commands" - export spineTest="nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" $SpinePOD/*" - export spineHtml="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\" $SpinePOD/*" - export spineEpub="spine --very-verbose --epub --output=\"\$SpineOUT\" $SpinePOD/*" - export spineLatex="spine --very-verbose --latex --output=\"\$SpineOUT\" $SpinePOD/*" - export spinePdf="spine --very-verbose --pdf --output=\"\$SpineOUT\" $SpinePOD/*" - export spineSqliteCreateDB="spine --very-verbose --sqlite-db-recreate --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\"" - export spineSqlite="spine --very-verbose --sqlite-discrete --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*" - #export spineSqlite="spine --very-verbose --sqlite-update --sqlite-db-path=\"$SpineDBpath\" --sqlite-db-filename=\"spine.search.db\" --output=\"\$SpineOUT\" $SpinePOD/*" ''; in with pkgs; { @@ -244,7 +165,7 @@ export SpineSQLdb='spine.search.db' packages = [ sqlite dub - dmd + #dmd ldc gnumake ]; @@ -283,7 +204,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -296,7 +217,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -313,7 +234,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -326,7 +247,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -398,9 +319,6 @@ with pkgs; # perl534Packages.Po4a ]; shellHook = '' - nix flake update - nix flake check - nix flake show echo ' shell.nix echo ❯❯ @@ -433,7 +351,7 @@ echo "ldc `${pkgs.ldc}/bin/ldc2 -v`" pkgs.callPackage ./devenv.nix {} #+END_SRC -** devenv.nix +** devenv.nix :default:devenv: #+HEADER: :tangle ../devenv.nix #+HEADER: :tangle-mode (identity #o644) @@ -610,6 +528,13 @@ installPhase = '' #+END_SRC ** variables used SET +*** spine version SET VERSION :version:set:project: + +#+NAME: spine_version_set +#+BEGIN_SRC sh +0.12.0 +#+END_SRC + *** nixpkgs path / url - nixpkgs_url_github @@ -629,19 +554,12 @@ github:NixOS/nixpkgs/nixpkgs-unstable /srv/nix/nixpkgs #+END_SRC -*** spine version SET VERSION :version:set:project: - -#+NAME: spine_version_set -#+BEGIN_SRC sh -0.12.0 -#+END_SRC - *** nixpkgs path options - -#+HEADER: :noweb yes #+NAME: nixpkgs_url +#+HEADER: :noweb yes #+BEGIN_SRC sh <> #+END_SRC -- cgit v1.2.3