aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-03-11 21:06:25 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-03-11 21:07:28 -0400
commit1aed76229222550727e7119bbca3cde59a043f9e (patch)
tree11e7b61079a467169750127565da1d7af66417fb
parentupdates incl. ldc-1.35.0, direnv-2.4.0 (diff)
package & nix update (sync with sisu spine)
-rw-r--r--.envrc3
-rw-r--r--.envrc-nix48
-rw-r--r--.gitignore2
-rw-r--r--derivation.nix2
-rw-r--r--flake.lock42
-rw-r--r--flake.nix17
-rw-r--r--nixDevEnv.sh3
-rw-r--r--org/config_env.org115
-rw-r--r--org/config_git.org2
-rw-r--r--org/config_nix.org19
-rwxr-xr-xshell.nix1
11 files changed, 142 insertions, 112 deletions
diff --git a/.envrc b/.envrc
index 6ad5fe2..669d42f 100644
--- a/.envrc
+++ b/.envrc
@@ -1,3 +1,6 @@
+if [ -f .envrc-git-init ]; then
+ source_env_if_exists .envrc-git-init || source .envrc-git-init
+fi
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
fi
diff --git a/.envrc-nix b/.envrc-nix
index 9e6ced6..95cbef3 100644
--- a/.envrc-nix
+++ b/.envrc-nix
@@ -1,7 +1,7 @@
NIX_ENFORCE_PURITY=1
# - https://github.com/nix-community/nix-direnv
-NixDirEnvVersion="2.4.0"
-NixDirEnvSHA="sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U="
+NixDirEnvVersion="3.0.0"
+NixDirEnvSHA="sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "${NixDirEnvSHA}"
fi
@@ -9,17 +9,39 @@ watch_file flake.lock
watch_file flake.nix
watch_file shell.nix
watch_file makefile
-watch_file .envrc
+watch_file nixDevEnv.sh
watch_file .envrc-local
watch_file .envrc-nix
-nix_direnv_watch_file flake.nix
-nix_direnv_watch_file shell.nix
-nix_direnv_watch_file .envrc
-nix_direnv_watch_file .envrc-local
-nix_direnv_watch_file .envrc-nix
-#nix flake update
-#nix flake check
-echo ""
PATH_add result/bin
-nix flake show
-#use flake .
+use flake .
+#use flake .#default
+echo '
+- consider running:
+ ❯❯ nix flake show
+ ❯❯ nix flake update && nix flake check && nix flake show
+
+- for a dev shell:
+ ❯❯ nix develop
+ ❯❯ nix develop ".#" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-epub" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-html" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-i18n" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-spine" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-sqlite" --print-build-logs -c zsh
+
+- to build project:
+ ❯❯ nix build --print-build-logs
+ ❯❯ nix build ".#" --print-build-logs
+ ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs
+ ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs
+ ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs
+ ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs
+ - (see nix other/additional build options):
+ ❯❯ nix flake show
+
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
+ ❯❯ dub build --compiler=ldmd --build=release --combined --skip-registry=all
+'
diff --git a/.gitignore b/.gitignore
index 0751d71..7970bde 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,12 @@
!nix/**
!*.nix
!flake.lock
+!nixDevEnv.sh
!.envrc
!.envrc-local
!.envrc-local_
!.envrc-nix
+!.envrc-git-init
!.env
!.env/**
!README
diff --git a/derivation.nix b/derivation.nix
index c59ee23..b1fc601 100644
--- a/derivation.nix
+++ b/derivation.nix
@@ -93,7 +93,7 @@ with (
);
mkDubDerivation rec {
pname = "spine";
- version = "0.12.0";
+ version = "0.14.0";
#zipfile = "spine-0.12.0-tag-0.11.2.r107.gf89a107.tar.gz";
src = fetchTarball {
url = "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/tarball/spine-0.12.0-tag-0.11.2.r107.gf89a107.tar.gz";
diff --git a/flake.lock b/flake.lock
index 2d0bf0b..9af9628 100644
--- a/flake.lock
+++ b/flake.lock
@@ -8,11 +8,11 @@
]
},
"locked": {
- "lastModified": 1697649634,
- "narHash": "sha256-y7V50JZuqyk7XX6yBJzvROaSTPkD1Tmo2foFOOxdDe4=",
+ "lastModified": 1710100203,
+ "narHash": "sha256-IchiF+x49QJb6jeWOrPctRIu7+OwBGFvsd5N/TrQZnQ=",
"ref": "refs/heads/main",
- "rev": "fd1a5c1ec645f39e6600d87c1830f851beb682b1",
- "revCount": 5,
+ "rev": "0fc094f1279b00e40dfc262b05ec9b4d295bdcbb",
+ "revCount": 8,
"type": "git",
"url": "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/packages/nix-flakes/dlang/dlang-nix-flakes"
},
@@ -26,11 +26,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1694529238,
- "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+ "lastModified": 1709126324,
+ "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+ "rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
@@ -44,11 +44,11 @@
"systems": "systems_2"
},
"locked": {
- "lastModified": 1694529238,
- "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@@ -62,11 +62,11 @@
"systems": "systems_3"
},
"locked": {
- "lastModified": 1694529238,
- "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@@ -77,11 +77,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1697379843,
- "narHash": "sha256-RcnGuJgC2K/UpTy+d32piEoBXq2M+nVFzM3ah/ZdJzg=",
+ "lastModified": 1710159071,
+ "narHash": "sha256-CT0WKgcmlcWZPZL/sSSICN/Vbm4Of0ZDgxc0GFf6sYU=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d",
+ "rev": "0fbcc4b2e8571f4af39be41752581ea09dd9ab06",
"type": "github"
},
"original": {
@@ -107,11 +107,11 @@
]
},
"locked": {
- "lastModified": 1697647426,
- "narHash": "sha256-1aGKqDOBurHKZNiBLBSJiZPlYf9MD53hO/WtI7/DSDQ=",
- "ref": "refs/heads/beta-builds",
- "rev": "d46ca676345160831a4bae8ad42f3e2245ff4bd1",
- "revCount": 601,
+ "lastModified": 1710099593,
+ "narHash": "sha256-OGHde1tqXPvbgbDzkektKgXLWa/wGDe1KkBdCGMow9U=",
+ "ref": "refs/heads/main",
+ "rev": "2a874332f535d13ae0dbe3ced6cd5cd55ae74f93",
+ "revCount": 624,
"type": "git",
"url": "file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine"
},
diff --git a/flake.nix b/flake.nix
index 08c50c8..c5bbcc1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,9 +19,9 @@
spine,
d-overlay,
} @ inputs: let
- version = "0.12.0";
- shell = ./shell.nix; # ./default.nix;
- devEnv = ./.envrc; # ./shell.nix; # ./default.nix;
+ version = "0.14.0";
+ shell = ./shell.nix;
+ devEnv = ./nixDevEnv.sh;
supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); # nixpkgs instantiated for supported system types
@@ -30,11 +30,10 @@
pkgs = nixpkgsFor.${system};
in {
default = spine.packages.${system}.default;
- spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
+ 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-overlay-dmd = spine.packages.${system}.spine-overlay-dmd;
- #spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
- #spine-overlay-gdc = spine.packages.${system}.spine-overlay-gdc;
+ spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
apps = forAllSystems (system: {
@@ -56,8 +55,6 @@
name = "spine base dev shell";
inherit shell;
inherit devEnv;
- #buildInputs = [ sqlite ];
- #nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
packages = [
ldc
#dmd
@@ -92,6 +89,7 @@
epr
sigil
calibre #(suite includes: ebook-viewer)
+ koreader
foliate
];
inherit shellHook;
@@ -118,7 +116,6 @@
#dmd
dub
gnumake
- sqlite
source-sans-pro
source-serif-pro
source-code-pro
diff --git a/nixDevEnv.sh b/nixDevEnv.sh
new file mode 100644
index 0000000..640d07e
--- /dev/null
+++ b/nixDevEnv.sh
@@ -0,0 +1,3 @@
+if [ -f .envrc ]; then
+ source_env_if_exists .envrc || source .envrc
+fi
diff --git a/org/config_env.org b/org/config_env.org
index 145160f..ec1e5c4 100644
--- a/org/config_env.org
+++ b/org/config_env.org
@@ -20,10 +20,23 @@
- [[./config_make.org][config_make.org]]
* envrc
+** nixDevEnv envrc :envrc:
+
+#+HEADER: :tangle ../nixDevEnv.sh
+#+BEGIN_SRC sh
+if [ -f .envrc ]; then
+ source_env_if_exists .envrc || source .envrc
+fi
+#+END_SRC
+
** envrc :envrc:
+#+NAME: envrc
#+HEADER: :tangle ../.envrc
#+BEGIN_SRC sh
+if [ -f .envrc-git-init ]; then
+ source_env_if_exists .envrc-git-init || source .envrc-git-init
+fi
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
fi
@@ -52,29 +65,63 @@ watch_file flake.lock
watch_file flake.nix
watch_file shell.nix
watch_file makefile
-watch_file .envrc
+watch_file nixDevEnv.sh
watch_file .envrc-local
watch_file .envrc-nix
-nix_direnv_watch_file flake.nix
-nix_direnv_watch_file shell.nix
-nix_direnv_watch_file .envrc
-nix_direnv_watch_file .envrc-local
-nix_direnv_watch_file .envrc-nix
-#nix flake update
-#nix flake check
-echo ""
PATH_add result/bin
-nix flake show
-#use flake .
+use flake .
+#use flake .#default
+echo '
+- consider running:
+ ❯❯ nix flake show
+ ❯❯ nix flake update && nix flake check && nix flake show
+
+- for a dev shell:
+ ❯❯ nix develop
+ ❯❯ nix develop ".#" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-epub" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-html" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-i18n" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-spine" --print-build-logs -c zsh
+ ❯❯ nix develop ".#dsh-sqlite" --print-build-logs -c zsh
+
+- to build project:
+ ❯❯ nix build --print-build-logs
+ ❯❯ nix build ".#" --print-build-logs
+ ❯❯ nix build ".#spine-nixpkgs-dmd" --print-build-logs
+ ❯❯ nix build ".#spine-overlay-dmd" --print-build-logs
+ ❯❯ nix build ".#spine-nixpkgs-ldc" --print-build-logs
+ ❯❯ nix build ".#spine-overlay-ldc" --print-build-logs
+ - (see nix other/additional build options):
+ ❯❯ nix flake show
+
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
+ ❯❯ dub build --compiler=ldmd --build=release --combined --skip-registry=all
+'
#+END_SRC
+*** 3.0.0
+
#+NAME: direnv-version
#+BEGIN_SRC sh
-2.4.0
+3.0.0
#+END_SRC
#+NAME: direnv-sha
#+BEGIN_SRC sh
+sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg=
+#+END_SRC
+
+*** 2.4.0
+
+#+BEGIN_SRC sh
+2.4.0
+#+END_SRC
+
+#+BEGIN_SRC sh
sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=
#+END_SRC
@@ -96,47 +143,3 @@ sha256-0000000000000000000000000000000000000000000=
NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000="
direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc
#+END_SRC
-
-** .envrc-local CHECK MODIFY
-
-- bespoke modify appropriately and generate if needed
-
-#+HEADER: :tangle ../.envrc-local_
-#+HEADER: :noweb yes
-#+BEGIN_SRC sh
-if [[ ! -d ./.git ]]; then
- git init
- git add .
-fi
-export DFLAGS="-O2 -inline -boundscheck=on -color=on"
-export SpineBIN=result/bin
-export SpinePROJ=~/grotto/repo/git.repo/projects/doc-reform/code/software/spine
-export SpineDOC=.
-export SpinePOD=${SpineDOC}/markup/pod
-export SpineOUT=/srv/www/spine
-export SpineSearchActionLocal='http://localhost/spine_search'
-export SpineSearchActionRemote='https://sisudoc.org/spine_search'
-export SpineCGIform='spine_search'
-export SpineSQLdb='spine.search.db'
-export SpineCGIbin=/var/www/cgi/cgi-bin
-export SpineDBpath=/var/www/sqlite
-#export SpineDBpath=/srv/www/spine/sqlite
-echo '
- .envrc-local echo ❯❯
-
- ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
-
- ❯❯ nix develop
- ❯❯ nix develop -c zsh
- ❯❯ nix develop ".#dsh-overlay-ldc" --print-build-logs
-
- ❯❯ nix build
- ❯❯ nix build ".#default" --print-build-logs
-'
-#+END_SRC
-
-#+BEGIN_SRC sh
-#export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
-#export NIX_PATH=/srv/nix/nixpkgs
-#export NIX_PATH=nixpkgs=/srv/nix/nixpkgs
-#+END_SRC
diff --git a/org/config_git.org b/org/config_git.org
index 1aa5744..b3c54a5 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -31,10 +31,12 @@
!nix/**
!*.nix
!flake.lock
+!nixDevEnv.sh
!.envrc
!.envrc-local
!.envrc-local_
!.envrc-nix
+!.envrc-git-init
!.env
!.env/**
!README
diff --git a/org/config_nix.org b/org/config_nix.org
index b9a61a2..0b27d4e 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -45,8 +45,8 @@
d-overlay,
} @ inputs: let
version = "<<spine_version_set>>";
- shell = ./shell.nix; # ./default.nix;
- devEnv = ./.envrc; # ./shell.nix; # ./default.nix;
+ shell = ./shell.nix;
+ devEnv = ./nixDevEnv.sh;
supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); # nixpkgs instantiated for supported system types
@@ -55,11 +55,10 @@
pkgs = nixpkgsFor.${system};
in {
default = spine.packages.${system}.default;
- spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
+ 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-overlay-dmd = spine.packages.${system}.spine-overlay-dmd;
- #spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
- #spine-overlay-gdc = spine.packages.${system}.spine-overlay-gdc;
+ spine-overlay-ldc = spine.packages.${system}.spine-overlay-ldc;
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});
apps = forAllSystems (system: {
@@ -81,8 +80,6 @@
name = "spine base dev shell";
inherit shell;
inherit devEnv;
- #buildInputs = [ sqlite ];
- #nativeBuildInputs = [ dub dmd ldc gdc gnumake ];
packages = [
ldc
#dmd
@@ -117,6 +114,7 @@
epr
sigil
calibre #(suite includes: ebook-viewer)
+ koreader
foliate
];
inherit shellHook;
@@ -143,7 +141,6 @@
#dmd
dub
gnumake
- sqlite
source-sans-pro
source-serif-pro
source-code-pro
@@ -237,6 +234,7 @@ with pkgs;
# epr
# sigil
# calibre #(suite includes: ebook-viewer)
+ # koreader
# foliate
# ❯❯❯ i18n translation related
# perl538Packages.Po4a
@@ -459,7 +457,7 @@ with (
#+NAME: spine_version_set
#+BEGIN_SRC sh
-0.12.0
+0.14.0
#+END_SRC
#+NAME: project_path_local_out_static
@@ -818,4 +816,3 @@ ls $SpineOutstatic/latex/*.tex
#echo "emacs nixNote_.org"
#echo "cat nixNote_.org"
#+END_SRC
-
diff --git a/shell.nix b/shell.nix
index 7f51502..b63acfc 100755
--- a/shell.nix
+++ b/shell.nix
@@ -46,6 +46,7 @@ with pkgs;
# epr
# sigil
# calibre #(suite includes: ebook-viewer)
+ # koreader
# foliate
# ❯❯❯ i18n translation related
# perl538Packages.Po4a