45 lines
863 B
Nix
45 lines
863 B
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-allauth-ens django-wiki loadcredential;
|
|
};
|
|
};
|
|
in
|
|
|
|
{
|
|
devShell = pkgs.mkShell {
|
|
name = "annuaire.dev";
|
|
|
|
packages = [
|
|
(python3.withPackages (ps: [
|
|
ps.django
|
|
ps.django-allauth-ens
|
|
ps.django-wiki
|
|
ps.loadcredential
|
|
ps.tinycss2
|
|
]))
|
|
];
|
|
|
|
env = {
|
|
DJANGO_SETTINGS_MODULE = "app.settings";
|
|
|
|
CREDENTIALS_DIRECTORY = builtins.toString ./.credentials;
|
|
|
|
WIKIENS_DEBUG = builtins.toJSON true;
|
|
WIKIENS_STATIC_ROOT = builtins.toString ./.static;
|
|
};
|
|
|
|
shellHook = ''
|
|
if [ ! -d .static ]; then
|
|
mkdir .static
|
|
fi
|
|
'';
|
|
};
|
|
}
|