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