shell.nix: Update to use virtualenv

This commit is contained in:
Tom Hubrecht 2023-05-19 14:59:19 +02:00
parent 892bf51163
commit 30e842ce80

View file

@ -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;
} }