selfprivacy-rest-api/shell.nix

42 lines
841 B
Nix
Raw Normal View History

{ pkgs ? import <nixos-22.11> { } }:
2022-01-24 19:56:48 +00:00
let
sp-python = pkgs.python310.withPackages (p: with p; [
2022-06-24 17:25:49 +00:00
setuptools
portalocker
pytz
pytest
pytest-mock
pytest-datadir
huey
2022-01-24 19:56:48 +00:00
gevent
mnemonic
coverage
2022-01-27 12:13:00 +00:00
pylint
2022-06-24 12:26:51 +00:00
pydantic
typing-extensions
2022-07-25 14:08:31 +00:00
psutil
black
fastapi
uvicorn
2022-10-28 08:09:36 +00:00
redis
strawberry-graphql
2022-01-24 19:56:48 +00:00
]);
in
pkgs.mkShell {
buildInputs = [
sp-python
pkgs.black
pkgs.redis
pkgs.restic
2022-01-24 19:56:48 +00:00
];
shellHook = ''
PYTHONPATH=${sp-python}/${sp-python.sitePackages}
# envs set with export and as attributes are treated differently.
# for example. printenv <Name> will not fetch the value of an attribute.
export USE_REDIS_PORT=6379
pkill redis-server
redis-server --bind 127.0.0.1 --port $USE_REDIS_PORT >/dev/null &
2022-01-24 19:56:48 +00:00
# maybe set more env-vars
'';
2022-06-24 17:25:49 +00:00
}