Unverified Commit 93da9175 authored by Alex James's avatar Alex James
Browse files

lix: fix installCheckPhase on Darwin

Set the build-test-env and build-test-shell Meson flags to ensure that
the BUILD_TEST_ENV and BUILD_TEST_SHELL environment variables are set,
as test_env_to_env depends on both of these variables [1].

[1]: https://git.lix.systems/lix-project/lix/commit/22b33b9d080f5220d399596790a5d69fe89add53
parent dd988bd5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ assert lib.assertMsg (
  closureInfo,
  runCommand,
  meson,
  bash,
  bison,
  boehmgc,
  boost,
@@ -35,6 +36,7 @@ assert lib.assertMsg (
  cargo,
  curl,
  cmake,
  darwin,
  doxygen,
  editline,
  flex,
@@ -375,6 +377,19 @@ stdenv.mkDerivation (finalAttrs: {
        ))
        (lib.mesonOption "build-test-shell" "${pkgsStatic.bash}/bin")
      ]
  ++
    lib.optionals
      (stdenv.hostPlatform.isDarwin && finalAttrs.doInstallCheck && lib.versionAtLeast version "2.95")
      [
        (lib.mesonOption "build-test-env" (
          lib.makeBinPath [
            darwin.file_cmds
            darwin.shell_cmds
            darwin.text_cmds
          ]
        ))
        (lib.mesonOption "build-test-shell" "${bash}/bin")
      ]
  ++ lib.optionals (lib.versionAtLeast version "2.95") [
    "--${
      if stdenv.hostPlatform != stdenv.buildPlatform then "cross" else "native"