blob: aa958512e962499f63d9597064029e9dcc9e4cae (
plain) (
blame)
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
41
42
43
44
45
46
|
# python-app
## Setting up
Rename `python_app` directory, name and main entrypoint in `setup.cfg`.
## Using
- running: `nix run`
- dev shell (for IDE): `nix develop`
- edit `setup.cfg` to add requirements (install_requires)
- edit `requirements.txt` for dev shell requirements
### Docker image
- build: `nix build .#image -o image`
- load to docker: `docker load < ./image`
## Updating mach-nix pypi deps db
Add to inputs:
```nix
pypi-deps-db = {
url = "github:davhau/pypi-deps-db/0000000000000000000000000000000000000000";
flake = false;
};
mach-nix.inputs.pypi-deps-db.follows = "pypi-deps-db";
```
## Adding git dependency
Add to mkPython ([more info](https://github.com/DavHau/mach-nix/blob/master/examples.md)):
```nix
packagesExtra = [
(mach.buildPythonPackage
{
src = builtins.fetchGit {
url = "https://github.com/user/repo";
ref = "branch";
rev = "0000000000000000000000000000000000000000";
};
})
];
```
|