From 701642b75188b76aca964c70b0b99ea980e10b97 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 29 Apr 2023 20:19:13 -0400 Subject: nix dev + update direnv 2.2.1 => 2.3.0 --- org/config_nix.org | 107 +++++++++++------------------------------------------ 1 file changed, 22 insertions(+), 85 deletions(-) (limited to 'org/config_nix.org') diff --git a/org/config_nix.org b/org/config_nix.org index 7153926..7cfd1a5 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -15,58 +15,11 @@ #+PROPERTY: header-args+ :mkdirp yes #+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 +- [[./doc-reform.org][doc-reform.org]] [[../org/][org/]] +- [[./config_env.org][config_env.org]] -- 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 SpineBIN=result/bin -export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine -export SpineDOC=. -export SpineOUT=/srv/www/spine -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 +* nix :nix: ** flake.nix :flake: #+HEADER: :tangle ../flake.nix @@ -77,9 +30,11 @@ export SpineSQLdb='spine.search.db' inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; - spine.url = "<>"; - spine.inputs.nixpkgs.follows = "nixpkgs"; - spine.flake = true; + spine = { + url = "git+file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine"; + inputs.nixpkgs.follows = "nixpkgs"; + flake = true; + }; }; outputs = { self, @@ -114,28 +69,7 @@ export SpineSQLdb='spine.search.db' shellHook = '' export DFLAGS="-O2 -inline -boundscheck=on -color=on" export Date=`date "+%Y%m%d"` - ### 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 SpineSearchActionLocal='http://localhost/spine_search' - export SpineSearchActionRemote='https://sisudoc.org/spine_search' - export SpineCGIform='spine_search' - export SpineSQLdb='spine.search.db' - 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/*" + ## set local values in .envrc-local (or here if you must) ''; in with pkgs; { @@ -148,7 +82,7 @@ export SpineSQLdb='spine.search.db' packages = [ sqlite dub - dmd + #dmd ldc gnumake ]; @@ -160,7 +94,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -187,7 +121,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -200,7 +134,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -217,7 +151,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -230,7 +164,7 @@ export SpineSQLdb='spine.search.db' inherit devEnv; packages = [ dub - dmd + #dmd ldc gnumake sqlite @@ -316,7 +250,13 @@ devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { default = pkgs.mkShell { - buildInputs = with pkgs; [ git dub dmd ldc sqlite ]; + buildInputs = with pkgs; [ + git + dub + #dmd + ldc + sqlite + ]; }; }); #+END_SRC @@ -453,9 +393,6 @@ with pkgs; # perl534Packages.Po4a ]; shellHook = '' - nix flake update - nix flake check - nix flake show echo ' shell.nix echo ❯❯ -- cgit v1.2.3