aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine_build_scaffold.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-02-25 10:36:43 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2021-03-05 16:34:52 -0500
commitc4089574242a027db1655f0ee15eac9953fe9993 (patch)
treec7576090a317f5cb915c4a6407393ca458d4ec4b /org/spine_build_scaffold.org
parentexternal & build dependences in src tree (diff)
cleaning
Diffstat (limited to 'org/spine_build_scaffold.org')
-rw-r--r--org/spine_build_scaffold.org154
1 files changed, 88 insertions, 66 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index f476485..fe30f53 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -357,6 +357,7 @@ get_depends:
hwd=$$(echo `pwd`) && \
gwd="$${hwd}/src/ext_depends" && \
dirs=$$(echo `ls -gx $${gwd}`) && \
+ license_bsl="Boost Software License 1.0 (BSL-1.0)" && \
echo $${hwd} && \
echo $${gwd} && \
echo $${dirs} && \
@@ -370,7 +371,9 @@ get_depends:
git clone --depth=1 https://github.com/tjhann/$${dir} && \
cd $${dir} && \
echo $$PWD && \
- echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \
+ echo "$${license_bsl}" >> ../$${dir}.meta && \
cd $${gwd} && \
rm -rf $${dir}/.git; \
elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \
@@ -378,7 +381,9 @@ get_depends:
rm -rf $${dir} && \
git clone --depth=1 https://github.com/dlang-community/$${dir} && \
cd $${dir} && \
- echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \
+ echo "$${license_bsl}" >> ../$${dir}.meta && \
cd $${gwd} && \
rm -rf $${dir}/.git; \
fi; \
@@ -395,16 +400,15 @@ get_depends:
rm -rf $${dir} && \
git clone --depth=1 https://github.com/lionello/$${dir} && \
cd $${dir} && \
- echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \
+ echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \
+ echo "https://github.com/lionello/$${dir}" >> ../$${dir}.meta && \
+ echo "MIT License" >> ../$${dir}.meta && \
cd $${ewd} && \
rm -rf $${dir}/.git; \
fi; \
fi; \
done; \
cd $${hwd}
-set_depends: get_depends
- cp -vi src/ext_depends/tinyendian/source/tinyendian.d src/ext_depends/D-YAML/source/dyaml/tinyendian.d && \
- echo "`cat src/ext_depends/shaHEADdep_tinyendian` - dyaml/tinyendian.d" >> src/ext_depends/shaHEADdep_D-YAML
#+END_SRC
gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git
@@ -1136,7 +1140,7 @@ gitsnapshot: distclean tangle
"name": "spine",
"version": "<<version_spine>>",
"description": "a sisu like document parser",
- "homepage": "http://sisudoc.org",
+ "homepage": "https://sisudoc.org",
"license": "AGPL-3.0+",
"targetPath": "./bin",
"sourcePaths": [ "./src/doc_reform" ],
@@ -1199,11 +1203,11 @@ gitsnapshot: distclean tangle
"copyright": "Copyright © 2011-2018, Ferdinand Majerech",
"sourcePaths": [
"./src/ext_depends/D-YAML/source/dyaml",
- "./src/ext_depends/D-YAML/source/tinyendian"
+ "./src/ext_depends/tinyendian/source"
],
"importPaths": [
"./src/ext_depends/D-YAML/source/dyaml",
- "./src/ext_depends/D-YAML/source/tinyendian"
+ "./src/ext_depends/tinyendian/source"
],
"preGenerateCommands": [
"rm -rf ./src/ext_depends/D-YAML/examples",
@@ -1242,7 +1246,7 @@ gitsnapshot: distclean tangle
"name": "spine",
"version": "<<version_spine>>",
"description": "a sisu like document parser",
- "homepage": "http://sisudoc.org",
+ "homepage": "https://sisudoc.org",
"license": "AGPL-3.0+",
"targetPath": "./bin",
"sourcePaths": [ "./src/doc_reform" ],
@@ -1357,7 +1361,7 @@ gitsnapshot: distclean tangle
"name": "spine",
"version": "<<version_spine>>",
"description": "a sisu like document parser",
- "homepage": "http://sisudoc.org",
+ "homepage": "https://sisudoc.org",
"license": "AGPL-3.0+",
"targetPath": "./bin",
"sourcePaths": [ "./src/doc_reform" ],
@@ -1413,7 +1417,7 @@ gitsnapshot: distclean tangle
"copyright": "Copyright © 2015 - 2020 Ralph Amissah",
"name": "spine",
"description": "a sisu like document parser",
- "homepage": "http://sisudoc.org",
+ "homepage": "https://sisudoc.org",
"license": "AGPL-3.0+",
"targetPath": "./bin",
"sourcePaths": [ "./src/doc_reform" ],
@@ -1460,7 +1464,7 @@ gitsnapshot: distclean tangle
#+END_SRC
* dub.sdl REFERENCE :dub:config:sdl:
-Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] (or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]])
+Every DUB package should contain a [[https://code.dlang.org/package-format?lang=json][dub.json]] (or [[https://code.dlang.org/package-format?lang=sdl][dub.sdl]])
not configured here using dub.json for the moment
@@ -1469,7 +1473,7 @@ not configured here using dub.json for the moment
#+BEGIN_SRC sh :NO-tangle ../dub.sdl :tangle-mode (identity #o755) :shebang #!/usr/bin/env dub
name "spine"
description "sisu document parser"
-homepage "http://sisudoc.org"
+homepage "https://sisudoc.org"
authors "Ralph Amissah"
copyright "Copyright (C) 2016 - 2020 Ralph Amissah"
license "AGPL-3.0+"
@@ -1479,11 +1483,11 @@ stringImportPaths "./views"
buildRequirements "allowWarnings"
targetType "executable"
platforms "posix"
-dependency "d2sqlite3" version="~><<version_d2sqlite3>>" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3
+dependency "d2sqlite3" version="~><<version_d2sqlite3>>" # https://code.dlang.org/packages/d2sqlite3 https://github.com/dlang-community/d2sqlite3
subconfiguration "d2sqlite3" "all-included"
dependency "imageformats" version="~><<version_imageformats>>" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats
dependency "dyaml" version="~><<version_dyaml>>" # https://code.dlang.org/packages/dyaml https://github.com/dlang-community/D-YAML
-dependency "tinyendian" version="~><<version_tinyendian>>" # http://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency
+dependency "tinyendian" version="~><<version_tinyendian>>" # https://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency
#+END_SRC
** default
@@ -1610,8 +1614,8 @@ configuration "build" {
* meson REVISIT :meson:build:
** notes
-http://mesonbuild.com/D.html
-http://mesonbuild.com/Dependencies.html#Dub
+https://mesonbuild.com/D.html
+https://mesonbuild.com/Dependencies.html#Dub
- create and move to subdirectory
rm -r build; mkdir build && cd build
@@ -1723,7 +1727,7 @@ spine_exe = executable('spine',
- dub
- https://code.dlang.org/packages/d2sqlite3
- upstream
- - https://github.com/biozic/d2sqlite3
+ - https://github.com/dlang-community/d2sqlite3
- dyaml
- dub
- https://code.dlang.org/packages/dyaml
@@ -1738,7 +1742,7 @@ spine_exe = executable('spine',
- https://github.com/lgvz/imageformats
- tinyendian (dyaml dependency)
- dub
- - http://code.dlang.org/packages/tinyendian
+ - https://code.dlang.org/packages/tinyendian
- upstream git clone
- https://github.com/dlang-community/tinyendian.git
#+END_SRC
@@ -1749,7 +1753,7 @@ spine_exe = executable('spine',
#+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap
[wrap-git]
directory = d2sqlite3
-url = https://github.com/biozic/d2sqlite3.git
+url = https://github.com/dlang-community/d2sqlite3.git
revision = head
#+END_SRC
@@ -2079,14 +2083,11 @@ make modificatons if desired
if type lorri &>/dev/null; then
echo "direnv: using lorri from PATH ($(type -p lorri))"
eval "$(lorri direnv)"
-else
- # fall back to using direnv's builtin nix support
- # to prevent bootstrapping problems.
+else # fallback prevent bootstrapping problems by using direnv's builtin nix support
use nix
NIX_ENFORCE_PURITY=0
fi
-# source an additional user-specific .envrc in ./.envrc-local
-if [ -e .envrc-local ]; then
+if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local
source .envrc-local
fi
#+END_SRC
@@ -2127,9 +2128,15 @@ fi
- bespoke modify appropriately and generate if needed
-#+BEGIN_SRC nix :NO-tangle ../.envrc-local
+#+BEGIN_SRC nix :tangle ../.envrc-local_
export NIX_PATH=nixpkgs=<<nixpkgs_path>>
-nix-instantiate --find-file nixpkgs
+## reload when these files change
+watch_file flake.nix
+# watch_file flake.lock
+## load the flake devShell
+eval "$(nix print-dev-env)"
+# echo $NIX_BUILD_TOP
+echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`"
#+END_SRC
**** nixpkgs_path SETUP
@@ -2137,7 +2144,7 @@ nix-instantiate --find-file nixpkgs
#+NAME: nixpkgs_path
#+BEGIN_SRC nix
-<<nixpkgs_path_default>>
+<<nixpkgs_path_local>>
#+END_SRC
***** nixpkgs path options
@@ -2149,17 +2156,17 @@ nix-instantiate --find-file nixpkgs
<nixpkgs>
#+END_SRC
-- local path
+- local path SET WARN
#+NAME: nixpkgs_path_local
#+BEGIN_SRC nix
-/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs
+/nixpkgs-ra/nixpkgs
#+END_SRC
** flake :flake:
- flake.nix
- /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs
+ /nixpkgs-ra/nixpkgs
./shell.nix
- shell.nix
./pkgs/shell-pkgs.nix
@@ -2179,7 +2186,7 @@ nix flake update --recreate-lock-file
description = "a sisu like document parser";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs";
+ nixpkgs.url = "/nixpkgs-ra/nixpkgs";
dub2nix-src = {
url = "github:lionello/dub2nix";
flake = false;
@@ -2208,7 +2215,7 @@ nix flake update --recreate-lock-file
description = "a sisu like document parser";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs";
+ nixpkgs.url = "/nixpkgs-ra/nixpkgs";
d2sqlite3 = {
url = "github:dlang-community/d2sqlite3";
flake = false;
@@ -2253,8 +2260,8 @@ nix flake update --recreate-lock-file
description = "a sisu like document parser";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
- nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs";
- # pkgs /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {}
+ nixpkgs.url = "/nixpkgs-ra/nixpkgs";
+ # pkgs /nixpkgs-ra/nixpkgs {}
#spine.url = "/grotto-ra/repo/git.repo/projects/project-spine/doc-reform";
#spine.url = "./.";
};
@@ -2287,13 +2294,13 @@ nix flake update --recreate-lock-file
nix-shell --pure -I nixpkgs=/nixpkgs-ra/nixpkgs
nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs {}; ldc"
- nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {}; [dub ldc]"
+ nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]"
shell.nix direnv: export +IN_NIX_SHELL
nix-shell -p nixFlakes
nix-shell -p nixFlakes --pure
- nix-shell -p nixFlakes --pure -p "with import /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {}; [dub ldc]"
+ nix-shell -p nixFlakes --pure -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]"
shell.nix -I .envrc
shell.nix
@@ -2303,7 +2310,8 @@ nix flake update --recreate-lock-file
nix-build -I .envrc
nix build
- nix build -f default.nix
+ nix build -f default.nix && noti
+ nix build -f default.nix && noti -t "spine built" -m "see ./result/bin/spine"
nix build -f project.nix
nix build -f spine.nix
@@ -2317,16 +2325,30 @@ pkgs.mkShell {
buildInputs = with pkgs; [
(import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; })
];
+ shellHook = ''
+ if [[ -e ".envrc" ]]; then
+ source .envrc
+ fi
+ '';
+}
+#+END_SRC
+
+
+#+BEGIN_SRC nix :NO-tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell"
+{ pkgs ? import <nixpkgs> {} }:
+pkgs.mkShell {
+ buildInputs = with pkgs; [
+ (import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; })
+ ];
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
+ nix-instantiate | nix show-derivation | jq
'';
}
-#+END_SRC
nix-shell nix/shell/shell_spine.nix --pure
@@ -2366,7 +2388,7 @@ mkDubDerivation rec {
{ inherit pkgs; }
)];
meta = with pkgs.lib; {
- homepage = http://sisudoc.org;
+ homepage = https://sisudoc.org;
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
@@ -2415,7 +2437,7 @@ mkDubDerivation rec {
echo "built $out/bin/spine"
'';
meta = with pkgs.lib; {
- homepage = http://sisudoc.org;
+ homepage = https://sisudoc.org;
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
@@ -2432,7 +2454,7 @@ mkDubDerivation rec {
- nix-build -I nixpkgs=<provide local nix path>
e.g. nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs
- nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs
+ nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs
nix-build -I .envrc-local
nix-build -I .envrc
default.nix -I .envrc
@@ -2535,7 +2557,7 @@ installPhase = ''
#+NAME: nix_project_meta
#+BEGIN_SRC nix
meta = with pkgs.lib; {
- homepage = http://sisudoc.org;
+ homepage = https://sisudoc.org;
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
@@ -2796,7 +2818,7 @@ jq
#+BEGIN_SRC sh :tangle ../.gitignore
# git ls-files --others --exclude-from=.git/info/exclude
-*
+,*
!.gitignore
!README.md
!COPYRIGHT
@@ -2851,18 +2873,18 @@ notes/**
!notes/reminders
!notes/reminders/**
.dub/**
-**/.dub/**
-**/cgi-bin/**
+,**/.dub/**
+,**/cgi-bin/**
tmp/**
-*_.org
-*_.d
-*_.txt
-*_
-*.swp
-*~
-*~
+,*_.org
+,*_.d
+,*_.txt
+,*_
+,*.swp
+,*~
+,*~
\#*
-*.\#*
+,*.\#*
#!*/
#\#*
#*.\#*
@@ -2871,7 +2893,7 @@ tmp/**
* misc
** sh script to batch process _emacs org babel tangle_ :shell_script:tangle:
- [[http://orgmode.org/manual/Batch-execution.html]]
+ [[https://orgmode.org/manual/Batch-execution.html]]
creates a shell batch script called "tangle", that will tangle (emacs org
babel tangle) org files in ./org/ to create .d source files in ./src/doc_reform/
(similar functionality is contained within the "makefile" created by this
@@ -2928,14 +2950,14 @@ nix-build project.nix
#+BEGIN_SRC sh
nix-shell --pure
-nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs
+nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs
#+END_SRC
- project.nix
#+BEGIN_SRC sh
nix-shell --pure
-nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs project.nix
+nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs
#+END_SRC
#+BEGIN_SRC sh
@@ -3090,8 +3112,8 @@ time make ldc_testrun_filelist_dir_pod
- [X] Set D_COMPILER (one of DMD LDC or GDC)
- [X] Set debug flags (using DMD standard flag -deb
-[[http://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]]
-[[http://dlang.org/download.html][D Compilers download http://dlang.org/download.html]]
+[[https://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]]
+[[https://dlang.org/download.html][D Compilers download https://dlang.org/download.html]]
** version info REVIEW :version:
@@ -3120,19 +3142,19 @@ sha256 = "0g5svf55i0kq55q49awmwqj9qi1n907cyrn1vjdjgs8nx6nn35gx";
- https://dlang.org/changelog/index.html
- https://dlang.org/changelog/pending.html
-- http://downloads.dlang.org/releases/
-- http://downloads.dlang.org/releases/2.x/
+- https://downloads.dlang.org/releases/
+- https://downloads.dlang.org/releases/2.x/
** dub :dub:
https://github.com/dlang/dub/
-http://code.dlang.org/getting_started
-http://code.dlang.org/docs/commandline
+https://code.dlang.org/getting_started
+https://code.dlang.org/docs/commandline
*** setup
**** dub json or sdlang
-Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]
+Every DUB package should contain a [[https://code.dlang.org/package-format?lang=json][dub.json]] or [[https://code.dlang.org/package-format?lang=sdl][dub.sdl]]
https://code.dlang.org/package-format?lang=sdl
https://code.dlang.org/packages/sdlang-d
https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md