Commit 3e8d53b9 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

python3Packages.pythonCatchConflictsHook: fix tests with lib.overrideDerivation

Use lib.overrideDerivation instead of <pkg>.overrideDerivation
to fix the evaluation of
python3Packages.pythonCatchConflictsHook.tests.catches-conflict-multiple-chains,
as buildPythonPackage and buildPythonApplication no longer provide
<pkg>.overrideDerivation

Clean up the leftover of commit 58bfe741 ("buildPython*:
Deprecate and remove (buildPython* { ... }).override")
parent b4e9f423
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ in {
      };
      passthru.tests = import ./python-catch-conflicts-hook-tests.nix {
        inherit pythonOnBuildForHost runCommand;
        inherit lib;
        inherit (pkgs) coreutils gnugrep writeShellScript;
      };
    } ./python-catch-conflicts-hook.sh) {};
+2 −2
Original line number Diff line number Diff line
{ pythonOnBuildForHost, runCommand, writeShellScript, coreutils, gnugrep }: let
{ lib, pythonOnBuildForHost, runCommand, writeShellScript, coreutils, gnugrep }: let

  pythonPkgs = pythonOnBuildForHost.pkgs;

@@ -38,7 +38,7 @@
  );

  # in order to test for a failing build, wrap it in a shell script
  expectFailure = build: errorMsg: build.overrideDerivation (old: {
  expectFailure = build: errorMsg: lib.overrideDerivation build (old: {
    builder = writeShellScript "test-for-failure" ''
      export PATH=${coreutils}/bin:${gnugrep}/bin:$PATH
      ${old.builder} "$@" > ./log 2>&1