tmc-cli: fix tests with Darwin sandbox

+13
+13
pkgs/by-name/tm/tmc-cli/package.nix
··· 1 { 2 lib, 3 fetchFromGitHub, 4 rustPlatform, 5 writableTmpDirAsHomeHook, ··· 23 writableTmpDirAsHomeHook 24 ]; 25 26 nativeInstallCheckInputs = [ 27 versionCheckHook 28 ]; 29 doInstallCheck = true; 30 versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}"; 31 versionCheckProgramArg = "--version"; 32 33 meta = { 34 description = "CLI for using the TestMyCode programming assignment evaluator";
··· 1 { 2 lib, 3 + stdenv, 4 fetchFromGitHub, 5 rustPlatform, 6 writableTmpDirAsHomeHook, ··· 24 writableTmpDirAsHomeHook 25 ]; 26 27 + checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ 28 + # When sandboxing, "Attempted to create a NULL object." 29 + # https://github.com/mullvad/system-configuration-rs/pull/59 may fix. 30 + "--skip=commands::courses::tests::list_courses_with_client_test" 31 + # Same 32 + "--skip=all_integration_tests" 33 + # When sandboxing, "Lazy instance has previously been poisoned." 34 + "--skip=commands::exercises::tests::list_exercises_with_client_test" 35 + ]; 36 + 37 nativeInstallCheckInputs = [ 38 versionCheckHook 39 ]; 40 doInstallCheck = true; 41 versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}"; 42 versionCheckProgramArg = "--version"; 43 + 44 + __darwinAllowLocalNetworking = true; 45 46 meta = { 47 description = "CLI for using the TestMyCode programming assignment evaluator";