mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
feat: nix shell improvements
This commit is contained in:
parent
b4676e1670
commit
fc2ba6fcff
3 changed files with 20 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -6,6 +6,8 @@ htmlcov
|
|||
scripts/sync_to_blitz.personal.sh
|
||||
docker/.env
|
||||
.venv
|
||||
pyrightconfig.json
|
||||
|
||||
# Nix
|
||||
result
|
||||
|
||||
|
|
|
|||
13
README.md
13
README.md
|
|
@ -19,6 +19,7 @@ This software is still considered BETA and may contain bugs. Don't expose it to
|
|||
- [Linux / macOS](#linux--macos-1)
|
||||
- [Windows](#windows-1)
|
||||
- [Development](#development)
|
||||
- [Using the nix package manager](#using-the-nix-package-manager)
|
||||
- [Installation](#installation-1)
|
||||
- [Sync changes to a RaspiBlitz](#sync-changes-to-a-raspiblitz)
|
||||
- [Debugging code running on a remote machine via VSCode](#debugging-code-running-on-a-remote-machine-via-vscode)
|
||||
|
|
@ -99,6 +100,18 @@ poetry shell
|
|||
|
||||
(To exit the poetry shell use: `exit`)
|
||||
|
||||
#### Using the nix package manager
|
||||
Blitz API provides a [Nix](https://github.com/NixOS/nix) Flake file to create a development environment. Execute `nix develop` (make sure you have flakes enabled) to enter the environment.
|
||||
|
||||
In this environment a hidden folder `.venv` is created to install the python dependencies locally. If pyright can't find these dependencies create the following file in the root
|
||||
folder of the project:
|
||||
```json
|
||||
{
|
||||
"venvPath": ".",
|
||||
"venv": ".venv"
|
||||
}
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@
|
|||
];
|
||||
venvDir = "./.venv";
|
||||
src = null;
|
||||
shellHook = ''
|
||||
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [
|
||||
pkgs.stdenv.cc.cc
|
||||
]}
|
||||
'';
|
||||
postVenv = ''
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue