diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-12 13:15:41 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-02-12 13:15:41 -0500 |
commit | 38cdb8f0ed3b968e44dc472bc81f63079cde375e (patch) | |
tree | cd7e7301c7a979a0d952643db653a76aeda4aa0d /org/config_env.org | |
parent | org blocks, identify syntax (diff) |
Diffstat (limited to 'org/config_env.org')
-rw-r--r-- | org/config_env.org | 142 |
1 files changed, 70 insertions, 72 deletions
diff --git a/org/config_env.org b/org/config_env.org index e46d868..6dddf9c 100644 --- a/org/config_env.org +++ b/org/config_env.org @@ -49,15 +49,15 @@ fi - https://github.com/nix-community/nix-direnv - source_url - - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv-sha>>" + - direnv fetchurl "https://raw.githubusercontent.com/nix-community/nix-direnv/<<direnv-version>>/direnvrc" "<<direnv_hash>>" - ${NixDirEnvVersion} #+HEADER: :tangle ../.envrc-nix #+BEGIN_SRC shell NIX_ENFORCE_PURITY=1 # - https://github.com/nix-community/nix-direnv -NixDirEnvVersion="<<direnv-version>>" -NixDirEnvSHA="<<direnv-sha>>" +NixDirEnvVersion="<<direnv_version>>" +NixDirEnvSHA="<<direnv_hash>>" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}" fi @@ -77,13 +77,14 @@ echo ' ❯❯ nix flake update && nix flake check && nix flake show • for a dev shell (development environment): - - ❯❯ nix develop - ❯❯ nix develop ".#" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh - ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh + • nix develop + ❯❯ nix develop ".#" --print-build-logs -c zsh + • nix develop using nixpkgs + ❯❯ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh + • nix develop using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>) + ❯❯ nix develop ".#dsh-overlay-dmd-dub" --print-build-logs -c zsh + ❯❯ nix develop ".#dsh-overlay-ldc-dub" --print-build-logs -c zsh ❯❯ nix flake show • to build project: @@ -92,12 +93,12 @@ echo ' ❯❯ nix build ".#" --print-build-logs • to build project (for build dependencies select appropriate dev env & build): - - ❯❯ nix build ".#spine-search-nixpkgs-dmd" --print-build-logs - ❯❯ nix build ".#spine-search-overlay-dmd" --print-build-logs - - ❯❯ nix build ".#spine-search-nixpkgs-ldc" --print-build-logs - ❯❯ nix build ".#spine-search-overlay-ldc" --print-build-logs + • nix build using nixpkgs + ❯❯ nix build ".#spine-search-nixpkgs-dmd" --print-build-logs + ❯❯ nix build ".#spine-search-nixpkgs-ldc" --print-build-logs + • nix build using package overlays: (dmd-<<dmd_version>>, ldc-<<ldc_version>>, dub-<<dub_version>>) + ❯❯ nix build ".#spine-search-overlay-dmd" --print-build-logs + ❯❯ nix build ".#spine-search-overlay-ldc" --print-build-logs • to build using dub on nix (get dependencies by setting your development environment): @@ -114,89 +115,86 @@ echo ' ' #+END_SRC -*** 3.0.6 - -#+NAME: direnv-version -#+BEGIN_SRC shell -3.0.6 -#+END_SRC +** .envrc-git-init -#+NAME: direnv-sha +#+HEADER: :tangle ../.envrc-git-init +#+HEADER: :noweb yes #+BEGIN_SRC shell -sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM= +if [[ ! -d ./.git ]]; then + git init + git add . +fi #+END_SRC -*** 3.0.4 +** .envrc-local CHECK MODIFY -#+BEGIN_SRC shell -3.0.4 -#+END_SRC +- bespoke modify appropriately and generate if needed +#+HEADER: :tangle ../.envrc-local +#+HEADER: :noweb yes #+BEGIN_SRC shell -sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4= +export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') +export SpineSearchBIN=result/share/cgi-bin +# ❯❯ cgi search form name: +export SpineCGIform='spine_search' +# ❯❯ configuration cgi search form path: +export SpineCGIbin=/var/www/cgi/cgi-bin #+END_SRC -*** 3.0.0 +* SHARED versions +** direnv -#+BEGIN_SRC shell -3.0.0 +#+NAME: direnv_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-version()>> #+END_SRC -#+BEGIN_SRC shell -sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg= +#+NAME: direnv_hash +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:direnv-hash()>> #+END_SRC -*** 2.4.0 - -#+BEGIN_SRC shell -2.4.0 -#+END_SRC +** spine project VERSION :version:set:project: -#+BEGIN_SRC shell -sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U= +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> #+END_SRC -#+BEGIN_SRC shell -2.3.0 -#+END_SRC +** dlang overlays +*** ldc -#+BEGIN_SRC shell -sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8= +#+NAME: ldc_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:ldc-version()>> #+END_SRC -#+NAME: direnv-sha_ -#+BEGIN_SRC shell -sha256-0000000000000000000000000000000000000000000= -#+END_SRC +*** dmd -#+BEGIN_SRC shell -- https://github.com/nix-community/nix-direnv -NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000=" -direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc +#+NAME: dmd_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dmd-version()>> #+END_SRC -** .envrc-git-init +*** dub -#+HEADER: :tangle ../.envrc-git-init +#+NAME: dub_version #+HEADER: :noweb yes -#+BEGIN_SRC shell -if [[ ! -d ./.git ]]; then - git init - git add . -fi +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dub-version()>> #+END_SRC -** .envrc-local CHECK MODIFY - -- bespoke modify appropriately and generate if needed +*** dtools -#+HEADER: :tangle ../.envrc-local +#+NAME: dtools_version #+HEADER: :noweb yes -#+BEGIN_SRC shell -export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') -export SpineSearchBIN=result/share/cgi-bin -# ❯❯ cgi search form name: -export SpineCGIform='spine_search' -# ❯❯ configuration cgi search form path: -export SpineCGIbin=/var/www/cgi/cgi-bin +#+BEGIN_SRC emacs-lisp +<<./nix-develop-dlang-shared.org:dtools-version()>> #+END_SRC + +* __END__ |