cleanup + add setup details

main
Ryan Rix 2023-03-02 13:26:22 -08:00
parent a76657cb6c
commit 32d9fdf328
2 changed files with 13 additions and 7 deletions

View File

@ -1,7 +1,15 @@
:PROPERTIES:
:ID: 20230302T132603.040866
:END:
#+TITLE: Arcology Phoenix Setup
#+ARCOLOGY_KEY: arcology/phx/setup
#+ARCOLOGY_ALLOW_CRAWL: t
#+AUTO_TANGLE: t
=nixpkgs= has pretty decent support for Elixir projects with some good helpers. In 2021 I tried an earlier incarnation of [[id:1d917282-ecf4-4d4c-ba49-628cbb4bb8cc][The Arcology Project]] in Elixir+Phoenix, got it working on my laptop but when time came to use Nix to put together a Docker container I couldn't get =ecto_sqlite3= to build. Since then, I have shipped a fully function [[id:arcology/fastapi][Arcology FastAPI]] prototype, but I am still quite interested in shipping this on the BEAM. Elixir is cool, and the [[id:20220225T175638.482695][Arcology Public Router]] could "just" be a =Phoenix.Plug=. Now that I have a proper database layer in the [[id:arcology/arroyo-page][Arroyo Arcology Generator]] many of the design shortcomings of the original Arcology Phoenix prototype can be worked around. I'll be writing a Content-Addressed Store, too, I think, for caching the pages.
* =nix-shell= for base dependencies
Install these packages from =nixpkgs=:
@ -58,19 +66,18 @@ in with pkgs; mkShell {
<<packages>>
];
shellHook = ''
export <<environment>>
<<shellHook>>
${elixir}/bin/mix --version
${elixir}/bin/iex --version
<<shellHook>>
'';
}
#+end_src
And set up [[id:45fc2a02-fcd0-40c6-a29e-897c0ee7b1c7][=direnv=]] (don't forget to =direnv allow=):
And set up [[id:45fc2a02-fcd0-40c6-a29e-897c0ee7b1c7][=direnv=]] (don't forget to [[shell:direnv allow][=direnv allow=]]):
#+begin_src shell :tangle .envrc
use nix

View File

@ -19,7 +19,6 @@ in with pkgs; mkShell {
'')
];
shellHook = ''
export LANG="C.UTF-8";
export ERL_AFLAGS="-kernel shell_history enabled";
@ -30,9 +29,9 @@ in with pkgs; mkShell {
export PATH="$HEX_HOME/bin:$MIX_HOME/escripts:$MIX_HOME/bin:$PATH";
export LIVEBOOK_HOME="$PWD";
${elixir}/bin/mix --version
${elixir}/bin/iex --version
'';
}