57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
sources ? import ./npins,
|
|
pkgs ? import sources.nixpkgs { },
|
|
}:
|
|
|
|
let
|
|
nix-pkgs = import sources.nix-pkgs {
|
|
inherit pkgs;
|
|
# Python 3.12 is required to have the correct SSL options for connecting with the legacy server
|
|
python3Pkgs = pkgs.python312.pkgs;
|
|
};
|
|
|
|
python3 = pkgs.python312.override {
|
|
packageOverrides = _: _: {
|
|
inherit (nix-pkgs)
|
|
django-browser-reload
|
|
django-bulma-forms
|
|
django-cas-server
|
|
loadcredential
|
|
;
|
|
};
|
|
};
|
|
in
|
|
|
|
{
|
|
devShell = pkgs.mkShell {
|
|
name = "cas-eleves.dev";
|
|
|
|
packages = [
|
|
(python3.withPackages (ps: [
|
|
ps.django
|
|
ps.ipython
|
|
ps.ldap3
|
|
|
|
ps.django-browser-reload
|
|
ps.django-bulma-forms
|
|
ps.django-cas-server
|
|
ps.loadcredential
|
|
]))
|
|
|
|
pkgs.gettext
|
|
pkgs.gtranslator
|
|
];
|
|
|
|
env = {
|
|
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
|
|
CE_DEBUG = true;
|
|
CE_STATIC_ROOT = builtins.toString ./.static;
|
|
};
|
|
|
|
shellHook = ''
|
|
if [ ! -d .static ]; then
|
|
mkdir .static
|
|
fi
|
|
'';
|
|
};
|
|
}
|