From 9788e4c12f8f10f5ce7376e5db47b1901f073e70 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 4 Jul 2023 14:36:46 -0400 Subject: [PATCH] fix the test app definition --- flake.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 89a4a6f14..e8c501bd1 100644 --- a/flake.nix +++ b/flake.nix @@ -90,15 +90,17 @@ # Create a derivation that includes a Python runtime, Tahoe-LAFS, and # all of its dependencies. makeTestEnv = pyVersion: { - ${packageName pyVersion} = (pkgs.${pyVersion}.withPackages (ps: with ps; - [ tahoe-lafs ] ++ - tahoe-lafs.passthru.extras.i2p ++ - tahoe-lafs.passthru.extras.tor ++ - tahoe-lafs.passthru.extras.unittest - )).overrideAttrs (old: { - name = packageName pyVersion; - }); + ${packageName pyVersion} = makeTestEnv' pyVersion; }; + + makeTestEnv' = pyVersion: (pkgs.${pyVersion}.withPackages (ps: with ps; + [ tahoe-lafs ] ++ + tahoe-lafs.passthru.extras.i2p ++ + tahoe-lafs.passthru.extras.tor ++ + tahoe-lafs.passthru.extras.unittest + )).overrideAttrs (old: { + name = packageName pyVersion; + }); in { # Define the flake's package outputs. We'll define one version of the # package for each version of Python we could find. We'll also point @@ -146,7 +148,7 @@ writeScript "unit-tests" '' export TAHOE_LAFS_HYPOTHESIS_PROFILE=ci - ${makeTestEnv pyVersion}/bin/python -m twisted.trial "$@" + ${makeTestEnv' pyVersion}/bin/python -m twisted.trial "$@" ''; }; };