forked from DGNum/gestioCOF
shell.nix: Update to use virtualenv
This commit is contained in:
parent
892bf51163
commit
30e842ce80
1 changed files with 14 additions and 17 deletions
31
shell.nix
31
shell.nix
|
@ -1,22 +1,19 @@
|
|||
let
|
||||
mach-nix = import
|
||||
(builtins.fetchGit {
|
||||
url = "https://github.com/DavHau/mach-nix";
|
||||
ref = "refs/tags/3.5.0";
|
||||
})
|
||||
{ };
|
||||
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||
|
||||
requirements = builtins.readFile ./requirements.txt;
|
||||
pkgs.mkShell {
|
||||
shellHook = ''
|
||||
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
|
||||
|
||||
requirements-dev = ''
|
||||
django-debug-toolbar
|
||||
ipython
|
||||
black
|
||||
isort
|
||||
flake8
|
||||
virtualenv .venv
|
||||
source .venv/bin/activate
|
||||
'';
|
||||
in
|
||||
|
||||
mach-nix.mkPythonShell {
|
||||
requirements = requirements + requirements-dev;
|
||||
packages = with pkgs; [
|
||||
python38
|
||||
python38Packages.pip
|
||||
python38Packages.virtualenv
|
||||
python38Packages.python-ldap
|
||||
];
|
||||
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue