From 1aed76229222550727e7119bbca3cde59a043f9e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 11 Mar 2024 21:06:25 -0400 Subject: package & nix update (sync with sisu spine) --- org/config_env.org | 115 +++++++++++++++++++++++++++-------------------------- org/config_git.org | 2 + org/config_nix.org | 19 ++++----- 3 files changed, 69 insertions(+), 67 deletions(-) (limited to 'org') diff --git a/org/config_env.org b/org/config_env.org index 145160f..ec1e5c4 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -20,10 +20,23 @@ - [[./config_make.org][config_make.org]] * envrc +** nixDevEnv envrc :envrc: + +#+HEADER: :tangle ../nixDevEnv.sh +#+BEGIN_SRC sh +if [ -f .envrc ]; then + source_env_if_exists .envrc || source .envrc +fi +#+END_SRC + ** envrc :envrc: +#+NAME: envrc #+HEADER: :tangle ../.envrc #+BEGIN_SRC sh +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 @@ -52,28 +65,62 @@ watch_file flake.lock watch_file flake.nix watch_file shell.nix watch_file makefile -watch_file .envrc +watch_file nixDevEnv.sh 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 . +use flake . +#use flake .#default +echo ' +- consider running: + ❯❯ nix flake show + ❯❯ nix flake update && nix flake check && nix flake show + +- for a dev shell: + ❯❯ nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-epub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-html" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-i18n" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-spine" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-sqlite" --print-build-logs -c zsh + +- to build project: + ❯❯ nix build --print-build-logs + ❯❯ nix build ".#" --print-build-logs + ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs + ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs + ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs + ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs + - (see nix other/additional build options): + ❯❯ nix flake show + + ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh + ❯❯ dub build --compiler=ldmd --build=release --combined --skip-registry=all +' #+END_SRC +*** 3.0.0 + #+NAME: direnv-version #+BEGIN_SRC sh -2.4.0 +3.0.0 #+END_SRC #+NAME: direnv-sha +#+BEGIN_SRC sh +sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= +#+END_SRC + +*** 2.4.0 + +#+BEGIN_SRC sh +2.4.0 +#+END_SRC + #+BEGIN_SRC sh sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= #+END_SRC @@ -96,47 +143,3 @@ sha256-0000000000000000000000000000000000000000000= NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc #+END_SRC - -** .envrc-local CHECK MODIFY - -- bespoke modify appropriately and generate if needed - -#+HEADER: :tangle ../.envrc-local_ -#+HEADER: :noweb yes -#+BEGIN_SRC sh -if [[ ! -d ./.git ]]; then - git init - git add . -fi -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 SpinePOD=${SpineDOC}/markup/pod -export SpineOUT=/srv/www/spine -export SpineSearchActionLocal='http://localhost/spine_search' -export SpineSearchActionRemote='https://sisudoc.org/spine_search' -export SpineCGIform='spine_search' -export SpineSQLdb='spine.search.db' -export SpineCGIbin=/var/www/cgi/cgi-bin -export SpineDBpath=/var/www/sqlite -#export SpineDBpath=/srv/www/spine/sqlite -echo ' - .envrc-local echo ❯❯ - - ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh - - ❯❯ nix develop - ❯❯ nix develop -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs - - ❯❯ nix build - ❯❯ nix build ".#default" --print-build-logs -' -#+END_SRC - -#+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 -#+END_SRC diff --git a/org/config_git.org b/org/config_git.org index 1aa5744..b3c54a5 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -31,10 +31,12 @@ !nix/** !*.nix !flake.lock +!nixDevEnv.sh !.envrc !.envrc-local !.envrc-local_ !.envrc-nix +!.envrc-git-init !.env !.env/** !README diff --git a/org/config_nix.org b/org/config_nix.org index b9a61a2..0b27d4e 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -45,8 +45,8 @@ d-overlay, } @ inputs: let version = "<>"; - shell = ./shell.nix; # ./default.nix; - devEnv = ./.envrc; # ./shell.nix; # ./default.nix; + shell = ./shell.nix; + devEnv = ./nixDevEnv.sh; 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 @@ -55,11 +55,10 @@ pkgs = nixpkgsFor.${system}; in { default = spine.packages.${system}.default; - spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc; + spine-nixpkgs-dmd = spine.packages.${system}.spine-nixpkgs-dmd; + spine-overlay-dmd = spine.packages.${system}.spine-overlay-dmd; spine-nixpkgs-ldc = spine.packages.${system}.spine-nixpkgs-ldc; - #spine-overlay-dmd = spine.packages.${system}.spine-overlay-dmd; - #spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc; - #spine-overlay-gdc = spine.packages.${system}.spine-overlay-gdc; + spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc; #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000="; }); apps = forAllSystems (system: { @@ -81,8 +80,6 @@ name = "spine base dev shell"; inherit shell; inherit devEnv; - #buildInputs = [ sqlite ]; - #nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; packages = [ ldc #dmd @@ -117,6 +114,7 @@ epr sigil calibre #(suite includes: ebook-viewer) + koreader foliate ]; inherit shellHook; @@ -143,7 +141,6 @@ #dmd dub gnumake - sqlite source-sans-pro source-serif-pro source-code-pro @@ -237,6 +234,7 @@ with pkgs; # epr # sigil # calibre #(suite includes: ebook-viewer) + # koreader # foliate # ❯❯❯ i18n translation related # perl538Packages.Po4a @@ -459,7 +457,7 @@ with ( #+NAME: spine_version_set #+BEGIN_SRC sh -0.12.0 +0.14.0 #+END_SRC #+NAME: project_path_local_out_static @@ -818,4 +816,3 @@ ls $SpineOutstatic/latex/*.tex #echo "emacs nixNote_.org" #echo "cat nixNote_.org" #+END_SRC - -- cgit v1.2.3