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
|
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||||
mach-nix = import
|
|
||||||
(builtins.fetchGit {
|
|
||||||
url = "https://github.com/DavHau/mach-nix";
|
|
||||||
ref = "refs/tags/3.5.0";
|
|
||||||
})
|
|
||||||
{ };
|
|
||||||
|
|
||||||
requirements = builtins.readFile ./requirements.txt;
|
pkgs.mkShell {
|
||||||
|
shellHook = ''
|
||||||
|
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
|
||||||
|
|
||||||
requirements-dev = ''
|
virtualenv .venv
|
||||||
django-debug-toolbar
|
source .venv/bin/activate
|
||||||
ipython
|
|
||||||
black
|
|
||||||
isort
|
|
||||||
flake8
|
|
||||||
'';
|
'';
|
||||||
in
|
|
||||||
|
|
||||||
mach-nix.mkPythonShell {
|
packages = with pkgs; [
|
||||||
requirements = requirements + requirements-dev;
|
python38
|
||||||
|
python38Packages.pip
|
||||||
|
python38Packages.virtualenv
|
||||||
|
python38Packages.python-ldap
|
||||||
|
];
|
||||||
|
|
||||||
|
allowSubstitutes = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue