aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-03-03 10:51:41 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2021-03-23 14:17:10 -0400
commite897eee6d6157314ef3396a4afca3c331eee9fe1 (patch)
tree2ec9d0e8b06086962651de34675c8bcaa78f7418 /org
parentext depends meta info: ver hash, license (diff)
make set_depends run dub describe, track json output
- traded $PWD for project root as ./, i.e. from dub describe json - dub describe deletes parts of dependencies that are unreferenced by the project build; these are available elsewhere and there is little reason to keep them
Diffstat (limited to 'org')
-rw-r--r--org/spine_build_scaffold.org39
1 files changed, 36 insertions, 3 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index 94745fd..87e3228 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -127,7 +127,7 @@
<<make_project_testrun_12>>
<<make_tangle_0>>
<<make_tangle_1>>
-<<make_nix_project_shell>>
+<<make_nix_project>>
<<make_git_snapshot>>
<<make_phony>>
#+END_SRC
@@ -361,6 +361,7 @@ get_depends:
echo $${hwd} && \
echo $${gwd} && \
echo $${dirs} && \
+ dub upgrade; \
cd $${gwd} && \
for dir in $${dirs}; do \
if [ -d $${dir} ]; then \
@@ -411,6 +412,19 @@ get_depends:
cd $${hwd}
set_depends: get_depends
dub describe | sed 's_$(shell echo `pwd | sed 's_/_\\/_g'`)_._g' > dub_describe.json
+rm_flakelock:
+ git reset HEAD flake.lock && \
+ touch flake.lock \
+ git rm -f flake.lock
+flake_update:
+ git add .; \
+ nix flake update && \
+ git reset HEAD flake.lock; \
+ cp flake.lock flake.lock_
+flake_update_move_lock: flake_update
+ touch flake.lock \
+ git rm -f flake.lock
+set_latest: set_depends flake_update rm_flakelock
#+END_SRC
gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git
@@ -1098,6 +1112,24 @@ tangle_maker:
(kill-buffer)) '($$ORGFILES)))" 2>&1
#+END_SRC
+**** tangle nix project
+
+#+NAME: make_nix_project
+#+BEGIN_SRC makefile
+lorri_shell:
+ lorri shell
+nix_shell:
+ nix-shell
+nix_build_default:
+ nix build -f default.nix && ./result/bin/spine -v
+nix_build_project:
+ nix build -f project.nix && ./result/bin/spine -v
+nix_build_spine:
+ nix build -f spine.nix && ./result/bin/spine -v
+nix-build_default:
+ nix-build default.nix
+#+END_SRC
+
*** git snapshot
#+NAME: make_git_snapshot
@@ -2181,7 +2213,7 @@ echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`"
nix develop
-nix flake update --recreate-lock-file
+nix flake update
#+BEGIN_SRC nix :tangle ../flake.nix
{
@@ -2313,7 +2345,8 @@ nix flake update --recreate-lock-file
nix build
nix build -f default.nix && noti
- nix build -f default.nix && noti -t "spine built" -m "see ./result/bin/spine"
+ nix build -f default.nix && ./result/bin/spine -v && noti -t "spine build" -m "see ./result/bin/spine"
+ nix build -f spine.nix && ./result/bin/spine -v && noti -t "spine build" -m "see ./result/bin/spine"
nix build -f project.nix
nix build -f spine.nix