gestioCOF/shell.nix

45 lines
937 B
Nix
Raw Normal View History

2023-05-19 14:59:19 +02:00
{ pkgs ? import <nixpkgs> { }, ... }:
2022-10-03 10:34:06 +02:00
2023-05-22 10:57:11 +02:00
let
python = pkgs.python38;
django-types = python.pkgs.buildPythonPackage rec {
pname = "django-types";
version = "0.17.0";
format = "pyproject";
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-wcQqt4h2xXxyg0LVqwYHJas3H8jcg7uFuuC+BoRqrXA=";
};
nativeBuildInputs = with python.pkgs; [ poetry-core ];
# setup.cfg tries to pull in nonexistent LICENSE.txt file
# postPatch = "rm setup.cfg";
# propagatedBuildInputs = [ django typing-extensions ];
};
in
2023-05-19 14:59:19 +02:00
pkgs.mkShell {
shellHook = ''
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
2022-10-03 10:34:06 +02:00
2023-05-19 14:59:19 +02:00
virtualenv .venv
source .venv/bin/activate
2023-05-19 15:12:51 +02:00
pip install -r requirements-devel.txt | grep -v 'Requirement already satisfied:'
2022-10-03 10:34:06 +02:00
'';
2023-05-22 10:57:11 +02:00
packages = [ python django-types ] ++ (with python.pkgs; [
pip
virtualenv
python-ldap
]);
2023-05-19 14:59:19 +02:00
allowSubstitutes = false;
2022-10-03 10:34:06 +02:00
}