mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-10-26 15:23:14 +03:00
Merge pull request #239 from tinybeachthor/docs-highlight-nix
docs: add nix syntax highlighting
This commit is contained in:
commit
73d0dbc482
@ -48,7 +48,7 @@ Unit tests can be executed via `nix run .#tests-unit`
|
||||
|
||||
Add an example flake under `./examples/name-of-example`.
|
||||
The flake can be tested via:
|
||||
```command
|
||||
```shell
|
||||
nix run .#tests-examples name-of-example --show-trace
|
||||
```
|
||||
The flake will be tested in the CI-pipeline as well.
|
||||
@ -72,7 +72,7 @@ Further instructions are contained in the template in form of code comments.
|
||||
|
||||
Add an example flake under `./examples/name-of-example`.
|
||||
The flake can be tested via:
|
||||
```command
|
||||
```shell
|
||||
nix run .#tests-examples name-of-example --show-trace
|
||||
```
|
||||
The flake will be tested in the CI-pipeline as well.
|
||||
|
@ -14,7 +14,7 @@ dream2nix.lib.init {
|
||||
```
|
||||
this file should look like this:
|
||||
```nix
|
||||
{dlib, lib, config, ...}:
|
||||
{ dlib, lib, config, ... }:
|
||||
{
|
||||
subsystems.rust.translators.example-translator = ./rust-translator.nix;
|
||||
# you can declare modules using functions here
|
||||
|
@ -114,7 +114,7 @@ Poetry uses `pyproject.toml` and `poetry.lock` to lock dependencies
|
||||
- Input: pyproject.toml, poetry.lock (toml)
|
||||
- Translator: written in pure nix, reading the toml input and generating the generic lock format
|
||||
- Generic Lock (for explanatory purposes dumped to json and commented):
|
||||
```json5
|
||||
```json
|
||||
{
|
||||
// generic lock format version
|
||||
"version": 1,
|
||||
|
@ -17,7 +17,7 @@ This translator simply executes `pip download` on the given source and observes
|
||||
The downside of this approach is, that this translator cannot be used with a granular builder. It does not understand the exact relation between the dependencies, and therefore it only allows to build all dependencies in one large derivation.
|
||||
|
||||
#### **pip** optional translator arguments
|
||||
```
|
||||
```nix
|
||||
{{#include ../../../src/subsystems/python/translators/pip/args.nix}}
|
||||
```
|
||||
|
||||
|
6
docs/theme/highlight.js
vendored
Normal file
6
docs/theme/highlight.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user