diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-08 20:28:06 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-12-23 18:17:24 -0500 |
commit | 684091e7e5c958561d4c0d7bd6c77f9a5efa80c3 (patch) | |
tree | 7b1d104632da28a7156b6d8446259389bac06b60 /org | |
parent | spine-search-cgi separate commits, remove sundry (diff) |
gitignore & things nix
Diffstat (limited to 'org')
-rw-r--r-- | org/config_git.org | 26 | ||||
-rw-r--r-- | org/config_nix.org | 103 |
2 files changed, 70 insertions, 59 deletions
diff --git a/org/config_git.org b/org/config_git.org index 3a1083b..328a192 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -23,10 +23,19 @@ #+HEADER: :tangle "../.gitignore" #+BEGIN_SRC sh # git ls-files --others --exclude-from=.git/info/exclude +# git check-ignore -v flake.lock # git clean -ix +# find . -name "*_" | xargs rm -rf +# find . -name "*.o" | xargs rm -rf ,* !.gitignore !.gitattributes +!*.nix +!nix +!nix/** +!*.nix +#!flake.lock +!.envrc !README.md !README !COPYRIGHT @@ -39,6 +48,8 @@ !meson.build !tangle !*.org +!org +!org/*.org !*.d !*.rb !*.txt @@ -47,15 +58,6 @@ !doc/** !man !man/** -!org -!sundry -!sundry/** -!*.nix -!nix -!nix/** -!flake.lock -!.envrc -!.envrc-local_ !.dr !.dr/* !src @@ -72,6 +74,7 @@ !**/*.ssm !subprojects !subprojects/*.wrap +!**/*.lib #!subprojects/*.meson.build #!subprojects/** !pod.manifest @@ -82,7 +85,6 @@ !docs/*.html !notes notes/** -!notes/*.org !notes/sisu-description.sst !notes/reminders !notes/reminders/** @@ -99,9 +101,7 @@ tmp/** ,*~ \#* ,*.\#* -!.env -!.env/local_ -!.env/echo-nixNote +!.envrc-local_ #!*/ #\#* #*.\#* diff --git a/org/config_nix.org b/org/config_nix.org index 7bd1645..86c61ee 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -148,9 +148,10 @@ fi #+BEGIN_SRC nix echo ".envrc called .envrc-local" PATH_add result/bin -export NIX_PATH=<<nix_path_channel>> -#export NIX_PATH=<<nixpkgs_path_local>> -export DFLAGS="-O2 -inline" +export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos +#export NIX_PATH=nixpkgs=/nixpkgs/nixpkgs +#export NIX_PATH=/nixpkgs/nixpkgs +export DFLAGS="-O2 -inline -boundscheck=on -color=on" # reload when these files change # watch_file flake.nix # watch_file flake.lock @@ -159,20 +160,22 @@ export DFLAGS="-O2 -inline" # echo $NIX_BUILD_TOP export Date=`date "+%Y%m%d"` export SpineVER=$(git describe --long --tags | sed 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g') -export SpinePROJ=<<project_path_local_project>> -export SpineSRC=<<project_path_local_src>> -export SpineBIN=<<project_path_local_bin>> -export SpineDOC=<<project_path_local_doc>> +export SpinePROJ=~/grotto/repo/git.repo/projects/project-spine/doc-reform +export SpineSRC=$SpinePROJ/src +export SpineBIN=$SpinePROJ/result/bin +export SpineDOC=~/grotto/repo/git.repo/projects/project-spine/doc-reform-markup/spine-markup-samples export SpinePOD=$SpineDOC/markup/pod -export SpineOUTversioned=<<project_path_local_out>> -export SpineOUT=<<project_path_local_out_static>> -export SpineDBpath=<<project_path_sqlite>> +export SpineOUTversioned=/srv/www/spine/$SpineVER +export SpineOUT=/srv/www/spine +export SpineDBpath=/var/www/sqlite +#export SpineDBpath=/srv/www/spine/sqlite export SpineSearchActionLocal='http://localhost/spine_search' export SpineSearchActionRemote='https://sisudoc.org/spine_search' export SpineCGIform='spine_search' export SpineSQLdb='spine.search.db' export PROG_VER_GIT="`git describe --long --tags | sed -e 's/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g'`" export PROG_VER_DECLARED="`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`" +#direnv allow #+END_SRC **** .env/echo-nixNote CHECK MODIFY @@ -491,12 +494,10 @@ postInstall: #+HEADER: :noweb yes #+BEGIN_SRC nix { - description = "A sisu like parser and document generator"; - inputs = { - flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:nixos/nixpkgs"; - #nixpkgs.url = "/nixpkgs-ra/nixpkgs"; - }; + description = "a sisu like parser and document generator"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.nixpkgs.url = "github:nixos/nixpkgs"; + #inputs.nixpkgs.url = "/nixpkgs-ra/nixpkgs"; outputs = { self, nixpkgs, flake-utils }: { packages.x86_64-linux.spine = let @@ -507,7 +508,7 @@ postInstall: in pkgs.stdenv.mkDerivation { pname = "spine"; version = "<<spine_version_set>>"; - description = "A sisu like parser and document generator"; + description = "a sisu like parser and document generator"; inherit self; src = self; shell = ./shell.nix; @@ -518,9 +519,7 @@ postInstall: for DC_ in dmd ldmd2 gdmd; do echo "- check for D compiler $DC_" DC=$(type -P $DC_ || echo "") - if [ ! "$DC" == "" ]; then - break - fi + if [ ! "$DC" == "" ]; then break; fi done if [ "$DC" == "" ]; then exit "Error: could not find D compiler" @@ -543,6 +542,8 @@ postInstall: runHook postInstall ''; postInstall = '' + echo `ls -la $out/bin/spine` + echo "" echo "nix build or nix develop? (suggestions):" echo '- nix build' echo ' nix build .#spine --print-build-logs' @@ -654,24 +655,21 @@ src = fetchTarball { #+HEADER: :tangle ../shell.nix #+HEADER: :tangle-mode (identity #o755) -#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure" +#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure\n#!nix-shell -i bash" #+HEADER: :noweb yes #+BEGIN_SRC nix -#!nix-shell -i bash { pkgs ? import <nixpkgs> {} }: with pkgs; mkShell { buildInputs = [ - ### nix_related direnv nixVersions.unstable #nixFlakes nix-prefetch-git validatePkgConfig - nix-tree jq + nix-tree jq nix-output-monitor git ps ### d_build_related - ## package manager dub ## compiler ldc @@ -718,27 +716,40 @@ mkShell { echo "" echo "nix flake show:" nix flake show - echo "" - echo "nix build or nix develop? (suggestions):" - echo '- nix build' - echo ' nix build .#spine --print-build-logs' - echo ' nix build --print-build-logs' - echo '- nix run' - echo ' nix run .#spine --print-build-logs' - echo ' nix run default.nix --print-build-logs' - echo '- nix shell' - echo ' nix shell --print-build-logs --command spine -v' - echo '- nix develop' - echo ' nix develop --build .#spine --print-build-logs' - echo ' nix develop --build -f derivation.nix -I .envrc --print-build-logs' - echo ' nix develop ; eval "$buildPhase"' - echo "" - echo 'spine -v' - echo "examine" - echo ' nix-instantiate | nix show-derivation | jq' - echo ' nix-build . --no-out-link | xargs -o nix-tree' - echo ' nix-tree --derivation .#spine' - echo "" + echo " + nix flake update + nix flake metadata + nix flake check + nix flake show + + nix build or nix develop? (suggestions): + + - nix build + nix build .#default --print-build-logs + nix build --print-build-logs + nix build .#default --print-build-logs |& nom + + - nix run + nix run .#spine --print-build-logs + nix run default.nix --print-build-logs + + - nix shell + nix shell --print-build-logs --command spine -v + + - nix develop + nix develop --build .#default --print-build-logs + nix develop --build -f derivation.nix -I .envrc --print-build-logs + nix develop ; eval \$buildPhase + + nix-build |& nom + + spine -v + + nix-instantiate | nix show-derivation | jq + nix-build . --no-out-link | xargs -o nix-tree + nix-tree --derivation .#spine + + " #echo "ldc `${pkgs.ldc}/bin/ldc2 -v`" ''; } |