Unverified Commit 186194d8 authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #331123 from ghpzin/330281-spidermonkey_91-fix-python312

parents 3d611ddb 2fbc05e8
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
, pkg-config
, python3
, python39
, python311
, rustc
, which
, zip
@@ -68,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: rec {
  ] ++ lib.optionals (lib.versionAtLeast version "91" && lib.versionOlder version "102") [
    # Fix 91 compatibility with python311
    (fetchpatch {
      url = "https://src.fedoraproject.org/rpms/mozjs91/raw/rawhide/f/0001-Python-Build-Use-r-instead-of-rU-file-read-modes.patch";
      url = "https://src.fedoraproject.org/rpms/mozjs91/raw/e3729167646775e60a3d8c602c0412e04f206baf/f/0001-Python-Build-Use-r-instead-of-rU-file-read-modes.patch";
      hash = "sha256-WgDIBidB9XNQ/+HacK7jxWnjOF8PEUt5eB0+Aubtl48=";
    })
  ];
@@ -79,7 +80,16 @@ stdenv.mkDerivation (finalAttrs: rec {
    perl
    pkg-config
    # 78 requires python up to 3.9
    (if lib.versionOlder version "91" then python39 else python3)
    # 91 does not build with python 3.12: ModuleNotFoundError: No module named 'six.moves'
    # 102 does not build with python 3.12: ModuleNotFoundError: No module named 'distutils'
    (
      if lib.versionOlder version "91" then
        python39
      else if lib.versionOlder version "115" then
        python311
      else
        python3
    )
    rustc
    rustc.llvmPackages.llvm # for llvm-objdump
    which