include .envrc-local #SpineBIN := "${SpineBIN}" # 'result/bin' #SpineOUT := "${SpineOUT}" # '/srv/www/spine' #SpinePOD := "${SpinePOD}" # '~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples/markup/pod' #SpineSearchAction := 'https://sisudoc.org/spine_search' #SpineCGIform := 'spine_search' #SpineSQLdb := 'spine.search.db' default: flake-check flake-check: nix flake update; \ nix flake check; \ echo -e 'nix flake show ❯❯\n'; \ nix flake show; \ echo -e '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh\n'; \ echo -e '❯❯ nix develop\n❯❯ nix develop -c zsh\n'; \ echo -e '❯❯ nix build ".#spine-ldc" --print-build-logs |& nom\n❯❯ nix build ".#spine-dmd" --print-build-logs |& nom\n'; \ echo -e '❯❯ make -s\n❯❯ make -s nix-build-ldc\n❯❯ make -s nix-build-dmd\n'; \ echo -e '❯❯ make -s ldc\n❯❯ make -s dmd\n'; \ echo -e '❯❯ $(DUB) --compiler=ldc2 --build=ldc2\n❯❯ $(DUB) --compiler=dmd --build=dmd\n'; nix-devshell: echo -ne '\n❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell"\n\n❯❯ nix build ".#default" --print-build-logs\n❯❯ nix build ".#spine-search-dmd" --print-build-logs\n❯❯ nix build ".#spine-search-ldc" --print-build-logs\n❯❯ nix build ".#spine-search-gdc" --print-build-logs\n\n'; \ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" # nix build build: nix-build-default nix-build-default: nix build ".#default" --print-build-logs nix-build-dmd: nix build ".#spine-search-dmd" --print-build-logs nix-build-ldc: nix build ".#spine-search-ldc" --print-build-logs nix-build-gdc: nix build ".#spine-search-gdc" --print-build-logs # get project external dependencies get_depends: hwd=$$(echo `pwd`) && \ gwd="$${hwd}/src/ext_depends" && \ license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ echo $${hwd} && \ echo $${gwd} && \ dub upgrade; \ deps=`echo "d2sqlite3 arsd"` && \ for dir in $${deps}; do \ if [ ! -d $${gwd}/$${dir} ]; then \ mkdir -p $${gwd}/$${dir}; \ fi; \ done; \ cd $${gwd} && \ for dir in $${deps}; do \ if [ -d $${dir} ]; then \ echo $${dir} && \ if [ "arsd" == $${dir} ]; then \ echo $${dir} && \ rm -rf $${dir} && \ mkdir $${dir} && \ cd $${dir} && \ wget "$${dir}/cgi.d" "https://raw.githubusercontent.com/adamdruppe/arsd/master/core.d"; \ wget "$${dir}/cgi.d" "https://raw.githubusercontent.com/adamdruppe/arsd/master/cgi.d" && \ cd $${gwd}; \ elif [[ "d2sqlite3" == $${dir} ]]; then \ echo $${dir} && \ rm -rf $${dir} && \ git clone --depth=1 https://github.com/dlang-community/$${dir} && \ cd $${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; \ fi; \ done; \ cd $${hwd} # get and set project external dependencies set_depends: get_depends dub describe | sed 's~$(shell echo `pwd | sed 's_/_\\/_g'`)~.~g' > dub_describe.json # cp cgi search form cp-cgi: sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \ sudo cp -vi result/share/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search