diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2021-02-04 22:12:27 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2021-02-04 22:25:39 -0500 |
commit | ba9da295a0efefc0537d7554b2f4488ae94ece2d (patch) | |
tree | 32c2e6d1d6d87c4dd4c322210baedb042be71ecf | |
parent | some pod samples including default generated and sisu-markup (diff) |
shell_spine.nix added
-rwxr-xr-x | default.nix | 1 | ||||
-rwxr-xr-x | nix/shell/shell_spine.nix | 18 | ||||
-rw-r--r-- | org/spine_build_scaffold.org | 30 | ||||
-rwxr-xr-x | shell.nix | 4 |
4 files changed, 49 insertions, 4 deletions
diff --git a/default.nix b/default.nix index 0c100a2..7e4f233 100755 --- a/default.nix +++ b/default.nix @@ -1,4 +1,3 @@ -#!/usr/bin/env -S nix-build { pkgs ? import <nixpkgs> {} }: with import ./nix/mkDub.nix { inherit pkgs; }; mkDubDerivation rec { diff --git a/nix/shell/shell_spine.nix b/nix/shell/shell_spine.nix new file mode 100755 index 0000000..0c0deb6 --- /dev/null +++ b/nix/shell/shell_spine.nix @@ -0,0 +1,18 @@ +{ pkgs ? import <nixpkgs> {} }: +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" + ''; +} 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 <nixpkgs> {} }: 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 <nixpkgs> {} }: +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 <nixpkgs> {} }: with import ./nix/mkDub.nix { inherit pkgs; }; mkDubDerivation rec { @@ -1,4 +1,3 @@ -#!/usr/bin/env -S nix-shell { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { buildInputs = with pkgs; [ @@ -7,6 +6,9 @@ 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 ''; } |