e11sync

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 87cdffd2129b41950078f3006ad61c47614749db (tree)
parent 75fb04d2278b2730493bc624053631b91a531afa
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date:   Sun, 14 Jan 2024 22:49:44 +0200

e11sync-static: patch sources correctly

Diffstat:
Mpkgs/e11sync-static.nix | 9+++++----
Mpkgs/e11sync.nix | 9++++-----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/pkgs/e11sync-static.nix b/pkgs/e11sync-static.nix @@ -17,17 +17,18 @@ stdenv.mkDerivation { python3Packages.django-compressor dart-sass ]; + patchPhase = ''patchShebangs --build app/manage.py''; buildPhase = '' mkdir -p static export E11SYNC_STATIC_ROOT=static export E11SYNC_DEBUG= export E11SYNC_COMPRESS_OFFLINE=1 - ${python3}/bin/python3 ${self}/app/manage.py collectstatic - ${python3}/bin/python3 ${self}/app/manage.py compress + app/manage.py collectstatic + app/manage.py compress ${findutils}/bin/find static/CACHE -name '*.css' | \ - ${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} sh -c \ - "${zopfli}/bin/zopfli {} && ${brotli}/bin/brotli {}" + ${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} sh -c \ + "${zopfli}/bin/zopfli {} && ${brotli}/bin/brotli {}" ''; installPhase = ''mv static $out''; } diff --git a/pkgs/e11sync.nix b/pkgs/e11sync.nix @@ -20,10 +20,10 @@ stdenv.mkDerivation { ]; nativeBuildInputs = [makeWrapper]; src = self; - dontUnpack = true; - buildPhase = '' - mkdir -p $out; - cp -r ${self}/app $out + patchPhase = ''patchShebangs --build app/manage.py''; + buildPhase = ''mkdir -p $out''; + installPhase = '' + cp -r app $out makeWrapper ${python3Packages.gunicorn}/bin/gunicorn $out/bin/e11sync-gunicorn \ --chdir $out/app \ --set-default E11SYNC_HTTP_PORT ${toString gunicornPort} \ @@ -39,7 +39,6 @@ stdenv.mkDerivation { passthru.tests = { unit = runCommand "e11sync-test" { - src = self; buildInputs = [ python3Packages.django_5 python3Packages.django-compressor