commit 187997f2a08c726cc24020cc6e62aed89415e560 (tree) parent 0a5abf6652edca33c5f6cde213b87d7a71cf4779 Author: Motiejus Jakštys <motiejus@jakstys.lt> Date: Sat, 13 Jan 2024 18:50:37 +0200 fix e11sync-static Diffstat:
| M | flake.nix | | | 17 | +++++++++-------- |
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/flake.nix b/flake.nix @@ -61,18 +61,19 @@ name = "e11sync-static"; src = self; nativeBuildInputs = buildDeps; - buildPhase = '' - mkdir -p $out/static - export E11SYNC_STATIC_ROOT=$out/static + buildPhase = with pkgs; '' + mkdir -p static + export E11SYNC_STATIC_ROOT=static export E11SYNC_DEBUG= export E11SYNC_COMPRESS_OFFLINE=1 - ${pkgs.python3}/bin/python3 ${self}/app/manage.py collectstatic - ${pkgs.python3}/bin/python3 ${self}/app/manage.py compress + ${python3}/bin/python3 ${self}/app/manage.py collectstatic + ${python3}/bin/python3 ${self}/app/manage.py compress - ${pkgs.findutils}/bin/find $out/static/CACHE -name '*.css' | \ - ${pkgs.findutils}/bin/xargs -P8 -I{} sh -c \ - "${pkgs.zopfli}/bin/zopfli {} && ${pkgs.brotli}/bin/brotli {}" + ${findutils}/bin/find static/CACHE -name '*.css' | \ + ${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} sh -c \ + "${zopfli}/bin/zopfli {} && ${brotli}/bin/brotli {}" ''; + installPhase = ''mv static $out''; }; packages.e11sync-gunicorn = pkgs.stdenv.mkDerivation { name = "e11sync-gunicorn";