Get undetected txi2p-tahoe test dependency into the test environment

This commit is contained in:
Jean-Paul Calderone 2022-01-27 16:27:10 -05:00
parent f03f5fb8d7
commit 16fd427b15
2 changed files with 14 additions and 4 deletions

View File

@ -28,7 +28,7 @@ in
# and those cases are handled below. The version can only be extracted if
# `setup.py update_version` has been run (this is not at all ideal but it
# seems difficult to fix) - so for now just be sure to run that first.
mach-nix.buildPythonPackage {
mach-nix.buildPythonPackage rec {
# Define the location of the Tahoe-LAFS source to be packaged. Clean up all
# as many of the non-source files (eg the `.git` directory, `~` backup
# files, nix's own `result` symlink, etc) as possible to avoid needing to
@ -86,4 +86,8 @@ mach-nix.buildPythonPackage {
# in its source distribution.
click-default-group.patches = [];
};
passthru.meta.mach-nix = {
inherit providers _;
};
}

View File

@ -16,9 +16,15 @@ let
tahoe-lafs = import ./. (args // { extras = [ "test" ]; });
# Put it into a Python environment.
python-env = pkgs.${pythonVersion}.withPackages (ps: [
tahoe-lafs
]);
python-env = mach-nix.mkPython {
inherit (tahoe-lafs.meta.mach-nix) providers _;
packagesExtra = [ tahoe-lafs ];
requirements = ''
# txi2p-tahoe is another dependency with an environment marker that
# mach-nix doesn't automatically pick up.
txi2p-tahoe
'';
};
in
# Make a derivation that runs the unit test suite.
pkgs.runCommand "tahoe-lafs-tests" { } ''