diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/config_make.org | 16 | ||||
-rw-r--r-- | org/config_nix.org | 92 |
2 files changed, 42 insertions, 66 deletions
diff --git a/org/config_make.org b/org/config_make.org index 2a7f5bd..ae41c51 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -62,6 +62,22 @@ deps := "`ls -gx './src/ext_depends'`" dirs_loc := "`ls -gx '.'`" #dirs := "`ls -gx ${gwd}`" +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-dmd --print-build-logs\n- nix build .#spine-ldc --print-build-logs\n- nix build .#spine-gdc --print-build-logs\n\n"; \ + nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell + +nix-build-default: + nix build .#default --print-build-logs + +nix-build-dmd: + nix build .#spine-dmd --print-build-logs + +nix-build-ldc: + nix build .#spine-ldc --print-build-logs + +nix-build-gdc: + nix build .#spine-gdc --print-build-logs + commands: rg --color=always -B1 "^[a-z]\w+:" makefile | less diff --git a/org/config_nix.org b/org/config_nix.org index 54fc862..937a7f2 100644 --- a/org/config_nix.org +++ b/org/config_nix.org @@ -35,8 +35,8 @@ #+HEADER: :tangle ../.envrc #+BEGIN_SRC sh -# nix_direnv_watch_file provided-filename use flake . +#use flake .#default NIX_ENFORCE_PURITY=1 NixDirEnvVersion="2.2.0" if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then @@ -44,9 +44,31 @@ if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then # source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000=" source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" fi +watch_file flake.lock +watch_file flake.nix +nix flake update && nix flake check --show-trace && nix flake show if [ -f .envrc-local ]; then source_env_if_exists .envrc-local || source .envrc-local fi +echo " + +- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell + +- nix build .#default --print-build-logs +- nix build .#spine-dmd --print-build-logs +- nix build .#spine-ldc --print-build-logs +- nix build .#spine-gdc --print-build-logs + +nix-shell '<nixpkgs>' -A nix --pure + +nix run .#default --print-build-logs + +nix develop --build .#default --print-build-logs + +nix shell .#default --print-build-logs --command spine -v +nix shell .#default --print-build-logs --command spine --very-verbose --epub --html --html-link-search --html-link-curate --curate --output=\"\$SpineOUT\" ./markup/pod +nix shell .#default --print-build-logs --command spine --very-verbose --html --html-link-search --html-link-curate --curate --sqlite-update --sqlite-db-filename=\"spine.search.db\" --cgi-sqlite-search-filename=\"spine_search\" --sqlite-db-path=\"\$SpineDBpath\" --output=\"\$SpineOUT\" ./markup/pod +" #+END_SRC **** .envrc-local CHECK MODIFY @@ -56,11 +78,6 @@ fi #+HEADER: :tangle ../.envrc-local_ #+HEADER: :noweb yes #+BEGIN_SRC sh -# reload when these files change -watch_file flake.lock -#watch_file flake.nix -nix flake update; nix flake check; nix flake show -#use flake .#default PATH_add result/bin #path_add PATH result/bin #export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos @@ -84,12 +101,6 @@ export SpineCGIform='spine_search' export SpineSQLdb='spine.search.db' #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 -echo " -nix build -v .#default --print-build-logs -nix run .#default --print-build-logs -nix shell .#default --print-build-logs --command spine -v -nix develop --build .#default --print-build-logs -" #+END_SRC *** flake :flake: @@ -119,6 +130,9 @@ nix develop --build .#default --print-build-logs let pkgs = nixpkgsFor.${system}; in { default = spine.packages.${system}.default; + spine-dmd = spine.packages.${system}.spine-dmd; + spine-ldc = spine.packages.${system}.spine-ldc; + spine-gdc = spine.packages.${system}.spine-gdc; #vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000="; }); devShells = forAllSystems (system: @@ -130,60 +144,6 @@ nix develop --build .#default --print-build-logs } #+END_SRC -***** flake single system - -#+HEADER: :tangle-NO ../flake-1_.nix -#+BEGIN_SRC nix -{ - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.spine.url = "git+file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine"; - outputs = { nixpkgs, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = import nixpkgs { inherit system; }; - in with pkgs; { - devShell = mkShell { buildInputs = [ git dub dmd ldc sqlite ]; }; - default = spine.packages.x86_64-linux.default; - }); -} -#+END_SRC - -#+HEADER: :tangle-NO ../flake-2_.nix -#+HEADER: :noweb yes -#+BEGIN_SRC nix -{ - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.spine.url = "git+file:///home/ralph/grotto/repo/git.repo/projects/doc-reform/code/software/spine"; - outputs = { nixpkgs, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: - with import nixpkgs { inherit system; }; { - devShell = mkShell { buildInputs = [ git dub dmd ldc sqlite ]; }; - default = spine.packages.x86_64-linux.default; - }); -} -#+END_SRC - -#+HEADER: :tangle-NO ../flake-3_.nix -#+HEADER: :noweb yes -#+BEGIN_SRC nix -{ - description = "a sisu like parser & document generator"; - #version = "<<spine_version_set>>"; - inputs.nixpkgs.url = "<<nixpkgs_url>>"; - inputs.spine.url = "<<spine_git_file_path_url>>"; - inputs.spine.flake = true; - inputs.spine-tarball.url = "<<spine_tarball_path_url>>"; - inputs.spine-tarball.flake = true; - outputs = { <<flake_outputs>>, spine, spine-tarball }: { - <<flake_output_spine>> - <<flake_output_spine_tarball>> - <<flake_output_spine_markup_samples>> - <<flake_output_default>> - }; -} -#+END_SRC - *** flake :flake: **** notes? |