From 4de350890441d7cf570abd376900cbade5b6ce66 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Thu, 12 Dec 2024 17:05:22 +0000 Subject: [PATCH] Make hatchling write us a _version.py when running the tests Co-authored-by: Benoit Donneaux --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index f1cbb459f..cc851d984 100644 --- a/flake.nix +++ b/flake.nix @@ -132,7 +132,8 @@ [ tahoe-lafs ] ++ tahoe-lafs.passthru.extras.i2p ++ tahoe-lafs.passthru.extras.tor ++ - tahoe-lafs.passthru.extras.unittest + tahoe-lafs.passthru.extras.unittest ++ + [ hatchling hatch-vcs ] )).overrideAttrs (old: { # See the similar override in makeRuntimeEnv'. name = packageName pyVersion; @@ -198,9 +199,11 @@ program = let python = "${makeTestEnv pyVersion}/bin/python"; + hatchling = "${makeTestEnv pyVersion}/bin/hatchling"; in writeScript "unit-tests" '' + ${hatchling} build --hooks-only # Write _version.py export TAHOE_LAFS_HYPOTHESIS_PROFILE=ci export PYTHONPATH=$PWD/src ${python} -m twisted.trial "$@"