From 187997f2a08c726cc24020cc6e62aed89415e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 13 Jan 2024 18:50:37 +0200 Subject: [PATCH] fix e11sync-static --- flake.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index e76a5d9..2deec5e 100644 --- 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";