I’m trying to install tornado 4.5.3 in my flake which is an older version by using overrideAttrs. The installation failed during the test phase. How can I disable the tests?
Here is my flake:
{
  description = "FSDS Simulator setup";
  inputs = {
    nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay";
    nixpkgs.follows = "nix-ros-overlay/nixpkgs"; # IMPORTANT!!!
  };
  outputs = { self, nix-ros-overlay, nixpkgs }:
    nix-ros-overlay.inputs.flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [ nix-ros-overlay.overlays.default ];
        };
        msgpack-rpc = { buildPythonPackage, fetchPypi }:
          buildPythonPackage rec {
            pname = "msgpack-rpc-python";
            version = "0.4.1";
            src = fetchPypi {
              inherit pname version;
              hash = "sha256-unGIEp8rqV+5cx+QaqgqWr1YJ91U7PxxUAj1ziMUU18=";
            };
            doCheck = false;
          };
      in {
        devShells.default = pkgs.mkShell {
          name = "FSDS Simulator";
          packages = (with pkgs; [
            colcon
            cmake
            opencv
            clang_12
            clang-tools_12
            yaml-cpp
            unzip
            curl
            qt5ct
          
            (python3Packages.callPackage msgpack-rpc { })
            (with rosPackages.humble; buildEnv {
              paths = [
                ros-core
                cv-bridge
                image-transport
                joy
                tf2
                tf2-ros
                rqt-gui
                rqt-common-plugins
                foxglove-bridge
                foxglove-msgs
                ament-cmake-core
                python-cmake-module
                python3Packages.numpy
                python3Packages.opencv4
                python3Packages.msgpack
                (python3Packages.tornado.overrideAttrs (oldAttrs: rec {
                  pname = "tornado";
                  version = "4.5.3";
                  src = fetchFromGitHub {
                    owner = "${pname}web";
                    repo = "${pname}";
                    rev = "refs/tags/v${version}";
                    hash = "sha256-aqtZRrIqwGyDwteSXnaJp6oBweoqfH4WZOOQxZsYUjw=";
                  };
                  doCheck = false;
                  pytestCheckPhase = false;
                  disabledTestPaths = [ 
                    "maint/test"
                    "tornado/test"
                  ];
                  }))
              ];})
          ]);
          
          shellHook = ''
            . Formula-Student-Driverless-Simulator/ros2/install/setup.bash 
          '';
        };
      });
}
Adding the following doesn’t do anything:
doCheck = false;
pytestCheckPhase = false;
And using
disabledTestPaths = [ 
  "maint/test"
  "tornado/test"
];
will return the following error
error: builder for '/nix/store/83ivqrpbvkafn34zxph16h9k7a7cplmd-python3.11-tornado-6.3.3.drv' failed with exit code 5;
       last 25 log lines:
       > patching script interpreter paths in /nix/store/pcfsdhvqla8gk88il5cnlkfyzl05rhcb-python3.11-tornado-6.3.3-dist
       > Executing pythonRemoveTestsDir
       > Finished executing pythonRemoveTestsDir
       > Running phase: installCheckPhase
       > no Makefile or custom installCheckPhase, doing nothing
       > Running phase: pythonCatchConflictsPhase
       > Running phase: pythonRemoveBinBytecodePhase
       > Running phase: pythonImportsCheckPhase
       > Executing pythonImportsCheckPhase
       > Check whether the following modules can be imported: tornado
       > Running phase: pytestCheckPhase
       > Executing pytestCheckPhase
       > ============================= test session starts ==============================
       > platform linux -- Python 3.11.7, pytest-7.4.3, pluggy-1.3.0
       > rootdir: /build/source
       > collected 0 items                                                              
       >
       > =============================== warnings summary ===============================
       > tornado/util.py:245
       >   /build/source/tornado/util.py:245: DeprecationWarning: invalid escape sequence '\d'
       >     """Unescape a string escaped by `re.escape`.
       >
       > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
       > ============================== 1 warning in 0.08s ==============================
       > /nix/store/bknngadwym46j65qs14ic2w79rpav888-stdenv-linux/setup: line 1582: pop_var_context: head of shell_variables not a function context
 :
: