Normalize bash prompts and flake descriptions.

pull/11/head
Joshua Potter 2023-12-01 10:12:16 -07:00
parent 42e71e6493
commit 9f8f33aff9
12 changed files with 53 additions and 38 deletions

View File

@ -40,10 +40,10 @@ touch "$OUT/$FILENAME"
Running `bootstrap` with these two files configured will invoke the following Running `bootstrap` with these two files configured will invoke the following
interactive script: interactive script:
```bash ```bash
$> bootstrap touch $ bootstrap touch
What file should I create for you? hello-world.txt What file should I create for you? hello-world.txt
Creating hello-world.txt Creating hello-world.txt
$> ls $ ls
... hello-world.txt ... ... hello-world.txt ...
``` ```
You should now see a new `hello-world.txt` file in your current working You should now see a new `hello-world.txt` file in your current working
@ -75,7 +75,7 @@ If flakes is not enabled or your nix version does not support
If you do not have Nix or prefer building from source, clone this repository and If you do not have Nix or prefer building from source, clone this repository and
run run
```bash ```bash
$> make BUILD=release $ make BUILD=release
``` ```
The `bootstrap` binary will be made available in `dist/release` by default. The `bootstrap` binary will be made available in `dist/release` by default.
@ -217,7 +217,7 @@ the project for your own purposes.
We use [Sput](https://www.use-strict.de/sput-unit-testing/) for unit tests. To We use [Sput](https://www.use-strict.de/sput-unit-testing/) for unit tests. To
run tests, type: run tests, type:
```bash ```bash
$> make test $ make test
``` ```
Tests are located in the `test` directory. `test/suites.c` serves as the Tests are located in the `test` directory. `test/suites.c` serves as the
entrypoint for the test runner. entrypoint for the test runner.
@ -228,8 +228,8 @@ We use [doxygen](https://www.doxygen.nl/index.html) for documentation
generation. Run either of the following two commands to generate documentation generation. Run either of the following two commands to generate documentation
locally: locally:
```bash ```bash
$> make docs $ make docs
$> doxygen $ doxygen
``` ```
### Formatting ### Formatting

View File

@ -1,6 +1,6 @@
{ {
description = '' description = ''
CLI for initializing new projects deterministically with flakes. CLI for initializing new projects deterministically with flakes.
''; '';
inputs = { inputs = {

View File

@ -5,7 +5,7 @@ the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. [direnv](https:
can be used to launch a dev shell upon entering this directory (refer to can be used to launch a dev shell upon entering this directory (refer to
`.envrc`). Otherwise run via: `.envrc`). Otherwise run via:
```bash ```bash
$> nix develop $ nix develop
``` ```
## Language Server ## Language Server
@ -19,7 +19,7 @@ must be generated. For this reason, [bear](https://github.com/rizsotto/Bear)
(version 3.1.3) is included in this flake. Use as follows to generate a (version 3.1.3) is included in this flake. Use as follows to generate a
`compile_commands.json` file: `compile_commands.json` file:
```bash ```bash
$> bear -- <your-build-command> $ bear -- <your-build-command>
``` ```
## Documentation ## Documentation
@ -28,7 +28,7 @@ Documentation is generated using [Doxygen](https://www.doxygen.nl/index.html)
(version 1.9.7). (Re)generate documentation by editing the `Doxyfile` and (version 1.9.7). (Re)generate documentation by editing the `Doxyfile` and
running: running:
```bash ```bash
$> doxygen $ doxygen
``` ```
## Formatting ## Formatting
@ -38,7 +38,7 @@ Formatting depends on the [clang-format](https://clang.llvm.org/docs/ClangFormat
A `pre-commit` hook is included in `.githooks` that can be used to format all A `pre-commit` hook is included in `.githooks` that can be used to format all
`*.c` and `*.h` files prior to commit. Install via: `*.c` and `*.h` files prior to commit. Install via:
```bash ```bash
$> git config --local core.hooksPath .githooks/ $ git config --local core.hooksPath .githooks/
``` ```
If running [direnv](https://direnv.net/), this hook is installed automatically If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory. when entering the directory.

View File

@ -2,8 +2,11 @@
description = '' description = ''
An opinionated clang flake. An opinionated clang flake.
To generate a copy of this template elsewhere, run: To generate a copy of this template elsewhere, install
$> bootstrap clang [bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap clang
```
''; '';
inputs = { inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for Elixir development
tool. [direnv](https://direnv.net/) can be used to launch a dev shell upon tool. [direnv](https://direnv.net/) can be used to launch a dev shell upon
entering this directory (refer to `.envrc`). Otherwise run via: entering this directory (refer to `.envrc`). Otherwise run via:
```bash ```bash
$> nix develop $ nix develop
``` ```
## Dependencies ## Dependencies
@ -30,7 +30,7 @@ Formatting depends on the `mix format` task. A `pre-commit` hook is included in
`.githooks` that can be used to format all `*.exs?` files prior to commit. `.githooks` that can be used to format all `*.exs?` files prior to commit.
Install via: Install via:
```bash ```bash
$> git config --local core.hooksPath .githooks/ $ git config --local core.hooksPath .githooks/
``` ```
If running [direnv](https://direnv.net/), this hook is installed automatically If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory. when entering the directory.

View File

@ -2,8 +2,11 @@
description = '' description = ''
An opinionated mix flake. An opinionated mix flake.
To generate a copy of this template elsewhere, run: To generate a copy of this template elsewhere, install
> bootstrap mix [bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap mix
```
''; '';
inputs = { inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a environment for Elixir development
(version 1.7.10) framework. [direnv](https://direnv.net/) can be used to launch (version 1.7.10) framework. [direnv](https://direnv.net/) can be used to launch
a dev shell upon entering this directory (refer to `.envrc`). Otherwise run via: a dev shell upon entering this directory (refer to `.envrc`). Otherwise run via:
```bash ```bash
$> nix develop $ nix develop
``` ```
## Quickstart ## Quickstart
@ -13,27 +13,27 @@ $> nix develop
An empty Postgres cluster is initialized at `/db`. To start the database, run An empty Postgres cluster is initialized at `/db`. To start the database, run
the following: the following:
```bash ```bash
$> pg_ctl -D db -l db/logfile -o --unix_socket_directories=@phoenix start $ pg_ctl -D db -l db/logfile -o --unix_socket_directories=@phoenix start
``` ```
In the above command, `@phoenix` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES). In the above command, `@phoenix` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES).
Rename to whatever is appropriate for your use case. To then connect to this Rename to whatever is appropriate for your use case. To then connect to this
database instance, run: database instance, run:
```bash ```bash
$> psql -h @phoenix $ psql -h @phoenix
``` ```
To later shut the database down, run: To later shut the database down, run:
```bash ```bash
$> pg_ctl -D db stop $ pg_ctl -D db stop
``` ```
Afterward, you can run the Phoenix setup commands: Afterward, you can run the Phoenix setup commands:
```bash ```bash
$> mix ecto.setup $ mix ecto.setup
$> mix assets.setup $ mix assets.setup
``` ```
and then start the local server: and then start the local server:
```bash ```bash
$> mix phx.server $ mix phx.server
``` ```
## Dependencies ## Dependencies
@ -41,7 +41,7 @@ $> mix phx.server
This project pins Mix dependencies using [mix2nix](https://github.com/ydlr/mix2nix). This project pins Mix dependencies using [mix2nix](https://github.com/ydlr/mix2nix).
After updating your `mix.lock` file, make sure to re-run the following: After updating your `mix.lock` file, make sure to re-run the following:
```bash ```bash
$> mix2nix > deps.nix $ mix2nix > deps.nix
``` ```
As of now, `mix2nix` cannot handle git dependencies found inside the `mix.lock` As of now, `mix2nix` cannot handle git dependencies found inside the `mix.lock`
file. If you have git dependencies, add them manually or use file. If you have git dependencies, add them manually or use
@ -58,7 +58,7 @@ Formatting depends on the `mix format` task. A `pre-commit` hook is included in
`.githooks` that can be used to format all `*.exs?` files prior to commit. `.githooks` that can be used to format all `*.exs?` files prior to commit.
Install via: Install via:
```bash ```bash
$> git config --local core.hooksPath .githooks/ $ git config --local core.hooksPath .githooks/
``` ```
If running [direnv](https://direnv.net/), this hook is installed automatically If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory. when entering the directory.

View File

@ -2,8 +2,11 @@
description = '' description = ''
An opinionated pheonix flake. An opinionated pheonix flake.
To generate a copy of this template elsewhere, run: To generate a copy of this template elsewhere, install
$> bootstrap phoenix [bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap phoenix
```
''; '';
inputs = { inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for Python (version
(version 1.7.0). [direnv](https://direnv.net/) can be used to a launch a dev (version 1.7.0). [direnv](https://direnv.net/) can be used to a launch a dev
shell upon entering this directory (refer to `.envrc`). Otherwise run via: shell upon entering this directory (refer to `.envrc`). Otherwise run via:
```bash ```bash
$> nix develop $ nix develop
``` ```
## Language Server ## Language Server
@ -23,7 +23,7 @@ Formatting depends on the [black](https://black.readthedocs.io/en/stable/index.h
(version 23.9.1) tool. A `pre-commit` hook is included in `.githooks` that can (version 23.9.1) tool. A `pre-commit` hook is included in `.githooks` that can
be used to format all `*.py` files prior to commit. Install via: be used to format all `*.py` files prior to commit. Install via:
```bash ```bash
$> git config --local core.hooksPath .githooks/ $ git config --local core.hooksPath .githooks/
``` ```
If running [direnv](https://direnv.net/), this hook is installed automatically If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory. when entering the directory.

View File

@ -5,8 +5,11 @@
This flake has been adapted from the `app` template found in: This flake has been adapted from the `app` template found in:
https://github.com/nix-community/poetry2nix https://github.com/nix-community/poetry2nix
To generate a copy of this template elsewhere, run: To generate a copy of this template elsewhere, install
$> bootstrap poetry [bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap poetry
```
''; '';
inputs = { inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for local
can be used to a launch a dev shell upon entering this directory (refer to can be used to a launch a dev shell upon entering this directory (refer to
`.envrc`). Otherwise run via: `.envrc`). Otherwise run via:
```bash ```bash
$> nix develop $ nix develop
``` ```
## Quickstart ## Quickstart
@ -13,15 +13,15 @@ $> nix develop
An empty Postgres cluster is initialized at `/db`. To start the database, run An empty Postgres cluster is initialized at `/db`. To start the database, run
the following: the following:
```bash ```bash
$> pg_ctl -D db -l db/logfile -o --unix_socket_directories=@postgres start $ pg_ctl -D db -l db/logfile -o --unix_socket_directories=@postgres start
``` ```
In the above command, `@postgres` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES). In the above command, `@postgres` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES).
Rename to whatever is appropriate for your use case. To then connect to this Rename to whatever is appropriate for your use case. To then connect to this
database instance, run: database instance, run:
```bash ```bash
$> psql -h @postgres $ psql -h @postgres
``` ```
To later shut the database down, run: To later shut the database down, run:
```bash ```bash
$> pg_ctl -D db stop $ pg_ctl -D db stop
``` ```

View File

@ -2,8 +2,11 @@
description = '' description = ''
An opinionated postgres flake. An opinionated postgres flake.
To generate a copy of this template elsewhere, run: To generate a copy of this template elsewhere, install
$> bootstrap postgres [bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap postgres
```
''; '';
inputs = { inputs = {