aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-02-04 22:12:27 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2021-02-04 22:25:39 -0500
commitba9da295a0efefc0537d7554b2f4488ae94ece2d (patch)
tree32c2e6d1d6d87c4dd4c322210baedb042be71ecf /org
parentsome pod samples including default generated and sisu-markup (diff)
shell_spine.nix added
Diffstat (limited to 'org')
-rw-r--r--org/spine_build_scaffold.org30
1 files changed, 28 insertions, 2 deletions
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 {