65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
|
{
|
||
|
sources ? import ./npins,
|
||
|
pkgs ? import sources.nixpkgs { },
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
|
||
|
|
||
|
python3 = pkgs.python3.override {
|
||
|
packageOverrides = _: _: {
|
||
|
inherit (nix-pkgs)
|
||
|
django-background-tasks
|
||
|
django-browser-reload
|
||
|
django-bulma-forms
|
||
|
django-translated-fields
|
||
|
loadcredential
|
||
|
;
|
||
|
|
||
|
authens = nix-pkgs.authens.overridePythonAttrs (old: {
|
||
|
patches = [ ./01-authens.patch ];
|
||
|
});
|
||
|
};
|
||
|
};
|
||
|
in
|
||
|
|
||
|
{
|
||
|
devShell = pkgs.mkShell {
|
||
|
name = "cas-eleves.dev";
|
||
|
|
||
|
packages = [
|
||
|
(python3.withPackages (ps: [
|
||
|
ps.django
|
||
|
ps.ipython
|
||
|
|
||
|
ps.markdown
|
||
|
ps.numpy
|
||
|
ps.networkx
|
||
|
|
||
|
ps.authens
|
||
|
ps.django-background-tasks
|
||
|
ps.django-browser-reload
|
||
|
ps.django-bulma-forms
|
||
|
ps.django-debug-toolbar
|
||
|
ps.django-translated-fields
|
||
|
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
|
||
|
'';
|
||
|
};
|
||
|
}
|