From e897eee6d6157314ef3396a4afca3c331eee9fe1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Mar 2021 10:51:41 -0500 Subject: 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 --- org/spine_build_scaffold.org | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'org') 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 @@ <> <> <> -<> +<> <> <> #+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 " `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 -- cgit v1.2.3