From 30a374ee03e27ce64ce3cb96f8b99f614179c595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 14 Jan 2024 23:41:19 +0200 Subject: [PATCH] test: patch the interpreter instead of invoking python directly --- pkgs/e11sync.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/e11sync.nix b/pkgs/e11sync.nix index 3daac2d..2904d5a 100644 --- a/pkgs/e11sync.nix +++ b/pkgs/e11sync.nix @@ -43,6 +43,7 @@ stdenv.mkDerivation { ''; passthru.tests.unit = runCommand "e11sync-test" { + src = self; buildInputs = [ python3Packages.django_5 python3Packages.django-compressor @@ -50,9 +51,11 @@ stdenv.mkDerivation { dart-sass ]; } '' - mkdir -p $out - cd ${self}/app + unpackPhase + patchShebangs --build $sourceRoot/app/manage.py + cd $sourceRoot export GEOIP_PATH="${geoip-archive}" - ${python3}/bin/python3 ./manage.py test + app/manage.py test app + mkdir -p $out ''; }