Commit 6815b625 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python312Packages.pyhanko: fix on darwin

parent 7dd2a130
Loading
Loading
Loading
Loading
+45 −30
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "MatthiasValvekens";
    repo = "pyHanko";
    rev = "refs/tags/v${version}";
    tag = "v${version}";
    hash = "sha256-HJkCQ5YDVr17gtY4PW89ep7GwFdP21/ruBEKm7j3+Qo=";
  };

@@ -92,12 +92,18 @@ buildPythonPackage rec {
    requests-mock
  ] ++ lib.flatten (lib.attrValues optional-dependencies);

  disabledTestPaths = [
  disabledTestPaths =
    [
      # ModuleNotFoundError: No module named 'csc_dummy'
      "pyhanko_tests/test_csc.py"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # OSError: One or more parameters passed to a function were not valid.
      "pyhanko_tests/cli_tests"
    ];

  disabledTests = [
  disabledTests =
    [
      # Most of the test require working with local certificates,
      # contacting OSCP or performing requests
      "test_generic_data_sign_legacy"
@@ -121,6 +127,15 @@ buildPythonPackage rec {
      "test_ocsp_embed"
      "test_ts_fetch_aiohttp"
      "test_ts_fetch_requests"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # OSError: One or more parameters passed to a function were not valid.
      "test_detached_cms_with_duplicated_attr"
      "test_detached_cms_with_wrong_tst"
      "test_diff_analysis_add_extensions_dict"
      "test_diff_analysis_update_indirect_extensions_not_all_path"
      "test_no_certificates"
      "test_ocsp_without_nextupdate_embed"
    ];

  pythonImportsCheck = [ "pyhanko" ];