hackens-orga/provisioning/static-assets.nix
2023-03-07 18:34:43 +01:00

10 lines
332 B
Nix

{ python, managePy, envPrefix ? ""}:
pkgs.runCommand "${name}-static" { buildInputs = [ src python ]; } ''
mkdir $out
export ${envPrefix}SECRET_KEY="collectstatic"
export ${envPrefix}STATIC_ROOT=$out
export ${envPrefix}DEBUG=0
export ${envPrefix}ALLOWED_HOSTS=
export ${envPrefix}DB_FILE=
${managePy} collectstatic
''