diff options
Diffstat (limited to 'org/config_nix.org')
| -rw-r--r-- | org/config_nix.org | 114 |
1 files changed, 74 insertions, 40 deletions
diff --git a/org/config_nix.org b/org/config_nix.org index 52e16e6..47074e4 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -4,7 +4,7 @@ #+FILETAGS: :spine:build:tools: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2024 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2025 Ralph Amissah #+LANGUAGE: en #+STARTUP: show4levels hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :exports code @@ -26,7 +26,6 @@ { description = "spine (sisu like parser & document generator) made available to process markup samples"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.spine = { url = "<<sisudoc_spine_nix_src>>"; inputs.nixpkgs.follows = "nixpkgs"; @@ -40,9 +39,9 @@ outputs = { self, nixpkgs, - flake-utils, spine, d-overlay, + ... } @ inputs: let version = "<<spine_version>>"; shell = ./shell.nix; @@ -55,9 +54,9 @@ pkgs = nixpkgsFor.${system}; in { default = spine.packages.${system}.default; - #spine-nixpkgs-dmd = spine.packages.${system}.spine-nixpkgs-dmd; + 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-nixpkgs-ldc = spine.packages.${system}.spine-nixpkgs-ldc; spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc; #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000="; }); @@ -70,9 +69,9 @@ devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; shellHook = '' + export DFLAGS="-O2 -boundscheck=on" export Date=`date "+%Y%m%d"` ## set local values in .envrc-local (or here if you must) - echo " ❯❯ ./result/bin/spine -v --source --pod --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ./markup/pod/*"; ''; in with pkgs; { @@ -95,7 +94,7 @@ dsh-overlay-ldc = d-overlay.devShells.${system}.dsh-overlay-ldc-dub; dsh-nixpkgs-ldc = d-overlay.devShells.${system}.dsh-nixpkgs-ldc-dub; dsh-epub = mkShell { - name = "spine dev shell for epub output"; + name = "spine-<<spine_version>> dev shell for epub output"; inherit shell; inherit devEnv; packages = [ @@ -107,8 +106,6 @@ libxml2 html-tidy xmlstarlet - epubcheck - ebook_tools libxml2 html-tidy xmlstarlet @@ -123,7 +120,7 @@ inherit shellHook; }; dsh-html = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for html output"; inherit shell; inherit devEnv; packages = [ @@ -143,7 +140,7 @@ inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ @@ -159,7 +156,7 @@ inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-<<spine_version>> dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ @@ -172,7 +169,7 @@ inherit shellHook; }; dsh-i18n = mkShell { - name = "spine dev shell internationalization, po4a"; + name = "spine-<<spine_version>> dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ @@ -185,6 +182,46 @@ ]; inherit shellHook; }; + dsh-build-spine-generate-samples-env-defaults = mkShell { + name = "spine-<<spine_version>> dev shell test build spine and generate samples env defaults"; + inherit shell; + inherit devEnv; + packages = [ + nix + sqlite + #chromium + #calibre #(suite includes: ebook-viewer) + ]; + shellHook = '' + export DFLAGS="-O2 -boundscheck=on" + ## set local values in .envrc-local (or here if you must) + nix build ".#spine-overlay-ldc" --print-build-logs + #$SpineBIN -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/* + $SpineBIN --very-verbose --sqlite-db-recreate --sqlite-db-filename=$SpineSQLdb --sqlite-db-path=./_tmp-db + $SpineBIN --very-verbose --source --pod --epub --html --html-link-curate --html-link-markup --sqlite-update --sqlite-db-filename=$SpineSQLdb --sqlite-db-path=./_tmp-db --curate --output=$SpineOUT $SpinePOD/* + echo "./result/bin/spine -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*" + ''; + }; + dsh-build-spine-generate-samples-test = mkShell { + name = "spine-<<spine_version>> dev shell test build spine and generate samples test"; + inherit shell; + inherit devEnv; + packages = [ + nix + sqlite + #chromium + #calibre #(suite includes: ebook-viewer) + ]; + shellHook = '' + export DFLAGS="-O2 -boundscheck=on" + ## set local values in .envrc-local (or here if you must) + nix build ".#spine-overlay-ldc" --print-build-logs + #./result/bin/spine -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ./markup/pod-samples/pod/* + ./result/bin/spine --very-verbose --sqlite-db-recreate --sqlite-db-filename=spine.search.db --sqlite-db-path=./_tmp-db + ./result/bin/spine --very-verbose --source --pod --epub --html --html-link-curate --html-link-markup --sqlite-update --sqlite-db-filename=spine.search.db --sqlite-db-path=./_tmp-db --curate --output=./OUTPUT_TEST_sisudocSpine ./markup/pod-samples/pod/* + echo "./result/bin/spine -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ./markup/pod-samples/pod/*" + ''; + }; default = import ./shell.nix {inherit pkgs;}; }); }; @@ -205,13 +242,13 @@ with pkgs; # ❯❯❯ nix_related ##nix #direnv - #nixVersions.nix_2_21 #nixVersions.latest #nixVersions.git + #nixVersions.latest #nixVersions.latest #nixVersions.git #nix-prefetch-git #validatePkgConfig nix-output-monitor #nix-tree #jq - #alejandra + #nixfmt-rfc-style #git # ❯❯❯ dev #gnumake @@ -220,14 +257,17 @@ with pkgs; # ❯❯ package manager #dub # ❯❯ compiler + #dmd #ldc - ##rund + #rund # ❯❯ linker - ##lld - ##mold + #lld + #mold # ❯❯ builder - ##ninja - ##meson + #ninja + #meson + # ❯❯ tools + #dtools # ❯❯❯ sqlite search related #sqlite # ❯❯❯ pdf_latex_related @@ -265,6 +305,7 @@ pkgs.callPackage ./devenv.nix {} #+END_SRC * devEnv +** devenv.nix :default:devenv: nix profile install . @@ -283,13 +324,13 @@ with pkgs; # ❯❯❯ nix_related #nix # if not on NixOS, this is needed direnv - nixVersions.nix_2_21 #nixVersions.latest #nixVersions.git + nixVersions.latest #nixVersions.latest #nixVersions.git #nixVersions.nix_2_29 #nixVersions.nix_2_29 nix-prefetch-git validatePkgConfig nix-output-monitor nix-tree - jq - #alejandra + jq #gx + #nixfmt-rfc-style git # ❯❯❯ dev gnumake @@ -386,7 +427,7 @@ with ( exit "Error: could not find D compiler" fi echo "$DC_ used as D compiler to build $pname" - dub run --compiler=$DC --build=release --combined --skip-registry=all + dub build --compiler=$DC --build=release --combined --skip-registry=all runHook postBuild ''; checkPhase = '' @@ -426,7 +467,7 @@ with ( sha256 = "<<spine_tarball_sha256>>"; }; nativeBuildInputs = with pkgs; [dub ldc]; - buildInputs = with pkgs; [nixVersions.nix_2_21 sqlite]; + buildInputs = with pkgs; [nixVersions.latest sqlite]; meta = with pkgs.lib; { description = "A sisu like parser & document generator"; longDescription = '' @@ -440,8 +481,6 @@ with ( } #+END_SRC -#src = ./.; - #+NAME: project_path_local_out_static #+HEADER: :noweb yes #+BEGIN_SRC nix @@ -467,7 +506,7 @@ file://<<spine_tarball_path>>/<<spine_tarball_filename>> #+END_SRC #+NAME: nixpkgs_local -#+BEGIN_SRC sh +#+BEGIN_SRC shell /srv/nixpkgs-dev/nixpkgs #+END_SRC @@ -489,12 +528,6 @@ spine-0.12.0-tag-0.11.2.r107.gf89a107.tar.gz sha256:03dr7dn7kq6arw4ry7qar13iqmi1caw70imfjwi8qr7g2j4mnk2q #+END_SRC -#+BEGIN_SRC nix -sha256:0000000000000000000000000000000000000000000000000000 -#+END_SRC - -/home/ralph/grotto/repo/git.repo/projects/project-spine/tarball - #+NAME: project_path_local_out_static_ #+BEGIN_SRC nix /var/www @@ -518,16 +551,13 @@ github:NixOS/nixpkgs/nixpkgs-unstable "nixpkgs/nixos-unstable"; #+END_SRC -#+BEGIN_SRC nix -"nixpkgs/nixos-23.05"; -#+END_SRC - #+HEADER: :noweb yes #+BEGIN_SRC nix <<nixpkgs_path_local>> #+END_SRC -** version info SET VERSION :version:set:project: +* SHARED +** version and other things shared *** spine project VERSION :version:set:project: #+NAME: spine_version @@ -536,7 +566,8 @@ github:NixOS/nixpkgs/nixpkgs-unstable <<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> #+END_SRC -*** spine project git sources VERSION :version:set:project: +*** spine project git sources +**** spine project git sources url #+NAME: sisudoc_spine_nix_src #+HEADER: :noweb yes @@ -544,6 +575,9 @@ github:NixOS/nixpkgs/nixpkgs-unstable <<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:sisudoc_spine_nix_src()>> #+END_SRC +*** spine project git sources url +**** spine project git sources overlay url + #+NAME: sisudoc_dlang_nix_overlay_src #+HEADER: :noweb yes #+BEGIN_SRC emacs-lisp |
