20 lines
351 B
Nix
20 lines
351 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
writeShellApplication,
|
|
}:
|
|
{
|
|
app,
|
|
pythonPackage,
|
|
manageFilePath,
|
|
src,
|
|
}:
|
|
writeShellApplication {
|
|
name = "manage-${app}";
|
|
runtimeInputs = [ pythonPackage ];
|
|
text = ''
|
|
PYTHON_PATH=${src} \
|
|
DJANGO_SETTINGS_MODULE=''${DJANGO_SETTINGS_MODULE:=${app}_settings.prod} \
|
|
python ${src}/${manageFilePath} "$@"
|
|
'';
|
|
}
|