aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-04-20 19:13:21 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-04-20 19:16:39 -0400
commit08e51e75cab75abc20992faed5fd8215d1b48d28 (patch)
treecfc56e49e4f77363d02b22b3f0342ee1cbc27f20
parentext-dep: d2sqlite3 updated (diff)
spine_build_scaffold: nix related housekeeping
- mkDub.nix (dub2nix) use lib, stdenv.lib deprecated - .envrc stop using lorri - .envrc-local_ set local variables as needed
-rw-r--r--.envrc8
-rw-r--r--nix/mkDub.nix3
-rw-r--r--org/spine_build_scaffold.org27
-rwxr-xr-xspine.nix3
4 files changed, 31 insertions, 10 deletions
diff --git a/.envrc b/.envrc
index 2b39146..6bb4547 100644
--- a/.envrc
+++ b/.envrc
@@ -1,10 +1,4 @@
-if type lorri &>/dev/null; then
- echo "direnv: using lorri from PATH ($(type -p lorri))"
- eval "$(lorri direnv)"
-else # fallback prevent bootstrapping problems by using direnv's builtin nix support
- use nix
- NIX_ENFORCE_PURITY=0
-fi
+NIX_ENFORCE_PURITY=0
if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local
source .envrc-local
fi
diff --git a/nix/mkDub.nix b/nix/mkDub.nix
index 5d34ac9..2121166 100644
--- a/nix/mkDub.nix
+++ b/nix/mkDub.nix
@@ -1,11 +1,12 @@
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
+ lib ? pkgs.lib,
ldc ? null,
dcompiler ? pkgs.ldc,
dub ? pkgs.dub
}:
assert dcompiler != null;
-with stdenv;
+with stdenv lib;
let
# Filter function to remove the .dub package folder from src
filterDub = name: type: let baseName = baseNameOf (toString name); in ! (
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index c2eb6d5..a6bbd72 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -2114,6 +2114,15 @@ make modificatons if desired
*** .envrc
#+BEGIN_SRC nix :tangle ../.envrc
+NIX_ENFORCE_PURITY=0
+if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local
+ source .envrc-local
+fi
+#+END_SRC
+
+- lorri?
+
+#+BEGIN_SRC nix :NO-tangle ../.envrc
if type lorri &>/dev/null; then
echo "direnv: using lorri from PATH ($(type -p lorri))"
eval "$(lorri direnv)"
@@ -2171,6 +2180,11 @@ watch_file flake.nix
eval "$(nix print-dev-env)"
# echo $NIX_BUILD_TOP
echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`"
+export PROJ=<<project_path_local>>
+echo "PROJ=<<project_path_local>>"
+echo '$PROJ/doc-reform/result/bin/spine --very-verbose --pod --source --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
+echo '$PROJ/doc-reform/result/bin/spine --very-verbose --html --epub --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
+echo '$PROJ/doc-reform/result/bin/spine --very-verbose --sqlite-discrete --output="/tmp/www" $PROJ/doc-reform-markup/spine-markup-samples/markup/pod/*'
#+END_SRC
**** nixpkgs_path SETUP
@@ -2197,6 +2211,15 @@ echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`"
/nixpkgs-ra/nixpkgs
#+END_SRC
+***** project path options
+
+- local path SET WARN
+
+#+NAME: project_path_local
+#+BEGIN_SRC nix
+/grotto-ra/repo/git.repo/projects/project-spine
+#+END_SRC
+
** flake :flake:
- flake.nix
@@ -2548,6 +2571,7 @@ mkDubDerivation rec {
#+BEGIN_SRC nix :tangle ../spine.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build"
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
+ lib ? pkgs.lib,
ldc ? null,
dcompiler ? pkgs.ldc,
dub ? pkgs.dub
@@ -2620,6 +2644,7 @@ aria2c https://raw.githubusercontent.com/lionello/dub2nix/master/mkDub.nix ./nix
#+BEGIN_SRC nix :tangle ../nix/mkDub.nix
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
+ lib ? pkgs.lib,
ldc ? null,
dcompiler ? pkgs.ldc,
dub ? pkgs.dub
@@ -2632,7 +2657,7 @@ aria2c https://raw.githubusercontent.com/lionello/dub2nix/master/mkDub.nix ./nix
#+NAME: mkDub_nix
#+BEGIN_SRC nix
assert dcompiler != null;
-with stdenv;
+with stdenv lib;
let
# Filter function to remove the .dub package folder from src
filterDub = name: type: let baseName = baseNameOf (toString name); in ! (
diff --git a/spine.nix b/spine.nix
index 1d9f352..fa90ad9 100755
--- a/spine.nix
+++ b/spine.nix
@@ -1,6 +1,7 @@
#!/usr/bin/env -S nix-build
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
+ lib ? pkgs.lib,
ldc ? null,
dcompiler ? pkgs.ldc,
dub ? pkgs.dub
@@ -9,7 +10,7 @@ assert dcompiler != null;
#with import ./nix/mkDub.nix { inherit pkgs; };
with ( # mkDub.nix
assert dcompiler != null;
- with stdenv;
+ with stdenv lib;
let
# Filter function to remove the .dub package folder from src
filterDub = name: type: let baseName = baseNameOf (toString name); in ! (