Created
December 6, 2024 16:15
-
-
Save jhh/14e11439a521082486d727962a4c9cb0 to your computer and use it in GitHub Desktop.
django-static-roots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
staticRoots = forAllSystems ( | |
system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
inherit (pkgs) stdenv; | |
pythonSet = pythonSets.${system}; | |
venv = pythonSet.mkVirtualEnv "upkeep-env" workspace.deps.default; | |
in | |
stdenv.mkDerivation { | |
name = "upkeep-static"; | |
# version = ?; | |
inherit (pythonSet.upkeep) src; | |
dontConfigure = true; | |
dontBuild = true; | |
nativeBuildInputs = [ | |
venv | |
]; | |
installPhase = '' | |
export DJANGO_STATICFILES_DIR="${self.packages.${system}.bundle}" | |
export DJANGO_STATIC_ROOT="$out" | |
upkeep-manage collectstatic | |
''; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment