Commit 49ac23d7 authored by sternenseemann's avatar sternenseemann
Browse files

tests.haskell.ghcWithPackages.regression-224542: make cross aware

Obviously, we can't run GHCi of a cross-compiler, but respecting targetPrefix
will give a more helpful error message:

    <command line>: not built for interactive use
parent d1bc568a
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -22,16 +22,19 @@ lib.recurseIntoAttrs {

  # See: https://github.com/NixOS/nixpkgs/pull/224542
  regression-224542 =
    let
      ghc = haskellPackages.ghcWithPackages (hsPkgs: [
        hsPkgs.hspec
      ]);
    in
    runCommand "regression-224542"
      {
        buildInputs = [
          (haskellPackages.ghcWithPackages (hsPkgs: [
            hsPkgs.hspec
          ]))
        nativeBuildInputs = [
          ghc
        ];
      }
      ''
        ghc --interactive \
        ${ghc.targetPrefix}ghc --interactive \
          -Werror=unrecognised-warning-flags \
          -Werror=missed-extra-shared-lib \
          2>&1 \