Update shell.nix and use django-types

This commit is contained in:
Tom Hubrecht 2023-05-22 10:57:11 +02:00
parent 14e0a3ef0a
commit af4c8e0744

View file

@ -1,5 +1,29 @@
{ pkgs ? import <nixpkgs> { }, ... }:
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
pkgs.mkShell {
shellHook = ''
export DJANGO_SETTINGS_MODULE=gestioasso.settings.local
@ -10,12 +34,11 @@ pkgs.mkShell {
pip install -r requirements-devel.txt | grep -v 'Requirement already satisfied:'
'';
packages = with pkgs; [
python38
python38Packages.pip
python38Packages.virtualenv
python38Packages.python-ldap
];
packages = [ python django-types ] ++ (with python.pkgs; [
pip
virtualenv
python-ldap
]);
allowSubstitutes = false;
}