summaryrefslogtreecommitdiff
path: root/Omni/Bild/README.md
blob: e1c026cf5f649ebd5236f03e636604d7037bd388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Bild

`bild` is the universal build tool. It can build and test everything in the repo.

Examples:
```bash
bild --test Omni/Bild.hs         # Build and test a namespace
bild --time 0 Omni/Cloud.nix     # Build with no timeout
bild --plan Omni/Test.hs         # Analyze build without building
```

When the executable is built, the output will go to `_/bin`. Example:

```bash
# build the example executable
bild Omni/Bild/Example.py
# run the executable
_/bin/example
```

## Adding New Dependencies

### Python Packages

To add a new Python package as a dependency:

1. Add the package name to `Omni/Bild/Deps/Python.nix` (alphabetically sorted)
2. Use it in your Python file with `# : dep <package-name>` comment at the top
3. Run `bild <yourfile.py>` to build with the new dependency

Example:
```python
# : out myapp
# : dep stripe
# : dep pytest
import stripe
```

The package name must match the nixpkgs python package name (usually the PyPI name).
Check available packages: `nix-env -qaP -A nixpkgs.python3Packages | grep <name>`