From ba9da295a0efefc0537d7554b2f4488ae94ece2d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 4 Feb 2021 22:12:27 -0500 Subject: shell_spine.nix added --- org/spine_build_scaffold.org | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'org') diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index d92c753..c99d486 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -1962,7 +1962,7 @@ nix flake update --recreate-lock-file nix build -f default.nix ./result/bin/spine -#+BEGIN_SRC nix :tangle ../shell.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" +#+BEGIN_SRC nix :tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell" { pkgs ? import {} }: pkgs.mkShell { buildInputs = with pkgs; [ @@ -1971,11 +1971,37 @@ pkgs.mkShell { buildPhase = "nix build -f default.nix"; shellHook = '' echo "built spine @ ./result/bin/spine" + if [[ -e ".envrc" ]]; then + source .envrc + fi #nix-instantiate | nix show-derivation | jq ''; } #+END_SRC +nix-shell nix/shell/shell_spine.nix --pure + +#+BEGIN_SRC nix :tangle ../nix/shell/shell_spine.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell" +{ pkgs ? import {} }: +pkgs.mkShell { + buildInputs = with pkgs; [ + (import ../pkglst/shell-pkgs.nix { inherit pkgs; }) + ]; + buildPhase = "nix build -f default.nix"; + shellHook = '' + if [[ -e ".envrc" ]]; then + source .envrc + fi + nix-build + RUN="./result/bin/spine --very-verbose --theme-light --html --epub --sqlite-discrete --output=/tmp/www ./data/pod/sisu-markup" + $RUN + echo "built spine ... @ ./result/bin/spine" + echo "& (tested with) run:" + echo " $RUN" + ''; +} +#+END_SRC + - combining shell.nix & default.nix to build package: #+BEGIN_SRC nix :NO-tangle ../shell.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" @@ -2068,7 +2094,7 @@ mkDubDerivation rec { nix build -f project.nix nix build -f spine.nix -#+BEGIN_SRC nix :tangle ../default.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build" +#+BEGIN_SRC nix :tangle ../default.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-build" { pkgs ? import {} }: with import ./nix/mkDub.nix { inherit pkgs; }; mkDubDerivation rec { -- cgit v1.2.3