File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -8,31 +8,34 @@ Prerequisites:
8
8
9
9
* Nix 2.8.x or later installed `(How to install Nix) <https: //nixos.org /download.html >`__
10
10
11
- First configure Nix channel if needed:
11
+ First `enable Nix flakes <https: //nixos.wiki /wiki /Flakes#Enable_flakes >`__ if needed.
12
+
13
+ Optionally `setup fastapi-mvc Nix binary cache <https: //app.cachix.org /cache /fastapi-mvc#pull >`__ to speed up the build process:
12
14
13
15
.. code-block:: bash
14
16
15
- nix-channel --add https://nixos .org/channels/nixos-22.05
16
- nix-channel --update
17
+ nix-env -iA cachix -f https://cachix .org/api/v1/install
18
+ cachix use fastapi-mvc
17
19
18
- Next install make via Nix :
20
+ To build default package run :
19
21
20
22
.. code-block:: bash
21
23
22
- nix-env --install gnumake
23
- # If you do not want to install make to your profile, one can always use it ad-hoc via nix-shell
24
- nix-shell -p gnumake
24
+ nix build .#default
25
25
26
- Lastly, use ``make install`` target :
26
+ Or with concrete Python version, should you choose :
27
27
28
28
.. code-block:: bash
29
29
30
- make install
31
- # Or
32
- nix-shell -p gnumake --run "make install"
30
+ # Build with Python38
31
+ nix build .#{{project_name}}-py38
32
+ # Build with Python39
33
+ nix build .#{{project_name}}-py39
34
+ # Build with Python310
35
+ nix build .#{{project_name}}-py310
33
36
34
- Or using Nix directly, should you choose :
37
+ Lastly, to spawn shell for development environment run :
35
38
36
39
.. code-block:: bash
37
40
38
- nix-build -E 'with import < nixpkgs > { overlays = [ (import ./overlay.nix) ]; }; callPackage ./editable.nix {python = pkgs.python310; poetry2nix = pkgs.poetry2nix;}'
41
+ nix develop .#default
You can’t perform that action at this time.
0 commit comments