How to prevent unit tests from running during build for specific dependent package for specific Python version

I am working on a patch for rss2email, which uses nix to build and test releases across multiple versions of Python. My patch adds the use of Python’s “parameterized” package for improved unit-testing of rss2email. However, the unit tests in that package don’t work in Python 3.8 right now, even though the package actually works fine, so when nix tries to build the Python 3.8 version of rss2email, it fails trying to build parameterized.

I would like to fix this by telling nix-build that it shouldn’t run unit tests when building parameterized for Python 3.8. I’ve not used nix before, so I’ve tried to get up-to-speed on the syntax and functionality and how to make this change correctly, and I just can’t figure out how to do it, despite spending several hours on it and trying many different approaches.

I’ve included my release.nix file below. Can somebody please help me out by explaining how I would modify it to prevent unit tests from being run during the Python 3.8 build of parameterized?

If you want to see/run it in situ, it’s at Branches · jikamens/rss2email-1 · GitHub on the branch user_agent_fixes.

Thank you!

P.S. If “Tell nix not to run unit tests when building parameterized for Python 3.8” is not in fact the right way to address this issue in the world of nix, please fill me in on what I should be doing instead!

{ nixpkgs ? import ./nixpkgs.nix }:
let
  pkgs = import nixpkgs {};

  supportedPackageSets = [
    { version = "3_5"; set = pkgs.python35Packages; }
    { version = "3_6"; set = pkgs.python36Packages; }
    { version = "3_7"; set = pkgs.python37Packages; }
    { version = "3_8"; set = pkgs.python38Packages; }
  ];
  latestSupportedPackageSet = pkgs.lib.last supportedPackageSets;

  src = pkgs.lib.cleanSource ../.;

  mkName = version: "rss2email-python_${version}";

  buildWith = pkgSet: pkgSet.set.buildPythonApplication {
    name = mkName pkgSet.version;
    version = "develop";

    inherit src;
    checkInputs = with pkgSet.set; [
      parameterized
    ];
    propagatedBuildInputs = with pkgSet.set; [
      feedparser
      html2text
    ];

    doCheck = true;
    checkPhase = ''
      env \
        PATH="$out/bin:$PATH" \
        PYTHONPATH=.:"$PYTHONPATH" \
          python3 ./test/test.py --verbose
    '';
  };

  # { "rss2email-python_3_5" = <rss2email package>; … }
  rss2emailVersions =
    (pkgs.lib.listToAttrs
      (map
        (pkgSet: pkgs.lib.nameValuePair
          (mkName pkgSet.version)
          (buildWith pkgSet))
        supportedPackageSets));

in {
  rss2email = buildWith latestSupportedPackageSet;

  pythonVersions = rss2emailVersions;
}