2024-07-02 09:52:53 +02:00
|
|
|
{
|
|
|
|
sources ? import ./npins,
|
|
|
|
pkgs ? import sources.nixpkgs { },
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
name = "cas-eleves.dev";
|
|
|
|
|
|
|
|
packages = [
|
2024-07-02 14:54:29 +02:00
|
|
|
# Python 3.12 is required to have the correct SSL options for connecting with the legacy server
|
|
|
|
(pkgs.python312.withPackages (ps: [
|
2024-07-02 09:52:53 +02:00
|
|
|
ps.django
|
2024-07-02 14:54:29 +02:00
|
|
|
ps.ipython
|
|
|
|
ps.ldap3
|
|
|
|
|
|
|
|
# Local packages
|
2024-07-02 09:52:53 +02:00
|
|
|
(ps.callPackage ./nix/django-cas-server { })
|
|
|
|
(ps.callPackage ./nix/loadcredential { })
|
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
|
|
|
env = {
|
|
|
|
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
|
|
|
|
CE_DEBUG = true;
|
2024-07-02 14:54:29 +02:00
|
|
|
CE_STATIC_ROOT = builtins.toString ./.static;
|
2024-07-02 09:52:53 +02:00
|
|
|
};
|
2024-07-02 14:54:29 +02:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
if [ ! -d .static ]; then
|
|
|
|
mkdir .static
|
|
|
|
fi
|
|
|
|
'';
|
2024-07-02 09:52:53 +02:00
|
|
|
};
|
|
|
|
}
|