Unverified Commit 95928065 authored by Bobby Rong's avatar Bobby Rong Committed by GitHub
Browse files

spidermonkey_140: init at 140.2.0 (#435900)

parents 85f258fd eb729061
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
import ./common.nix {
  version = "140.2.0";
  hash = "sha512-5Fl8TYOuGoT86SSP5splKvbDYVYH/IlzvZF7/b0qu87Kk3/kxinAzcifoKXIRrXi2KS0Tav3/rIB3rOC3gzMWw==";
}
+22 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@

  # runtime
  icu75,
  icu77,
  nspr,
  readline,
  zlib,
@@ -65,6 +66,14 @@ stdenv.mkDerivation (finalAttrs: {
        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=";
      })
    ]
    ++ lib.optionals (lib.versionAtLeast version "140") [
      # mozjs-140.pc does not contain -DXP_UNIX on Linux
      # https://bugzilla.mozilla.org/show_bug.cgi?id=1973994
      (fetchpatch {
        url = "https://src.fedoraproject.org/rpms/mozjs140/raw/49492baa47bc1d7b7d5bc738c4c81b4661302f27/f/9aa8b4b051dd539e0fbd5e08040870b3c712a846.patch";
        hash = "sha256-SsyO5g7wlrxE7y2+VTHfmUDamofeZVqge8fv2y0ZhuU=";
      })
    ];

  nativeBuildInputs = [
@@ -89,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  buildInputs = [
    icu75
    (if (lib.versionAtLeast version "140") then icu77 else icu75)
    nspr
    readline
    zlib
@@ -120,6 +129,12 @@ stdenv.mkDerivation (finalAttrs: {
  ++ lib.optionals (lib.versionAtLeast version "91") [
    "--disable-debug"
  ]
  ++ lib.optionals (lib.versionAtLeast version "140") [
    # For pkgconfig file.
    # https://bugzilla.mozilla.org/show_bug.cgi?id=1907030
    # https://bugzilla.mozilla.org/show_bug.cgi?id=1957023
    "--includedir=${placeholder "dev"}/include"
  ]
  ++ [
    "--disable-jemalloc"
    "--disable-strip"
@@ -177,6 +192,11 @@ stdenv.mkDerivation (finalAttrs: {
      configureScript=../js/src/configure
    '';

  env = lib.optionalAttrs (lib.versionAtLeast version "140") {
    # '-Wformat-security' ignored without '-Wformat'
    NIX_CFLAGS_COMPILE = "-Wformat";
  };

  # Remove unnecessary static lib
  preFixup = ''
    moveToOutput bin/js${lib.versions.major version}-config "$dev"
@@ -195,6 +215,7 @@ stdenv.mkDerivation (finalAttrs: {
    maintainers = with maintainers; [
      lostnet
      catap
      bobby285271
    ];
    broken = stdenv.hostPlatform.isDarwin; # 91 is broken, >=115 requires SDK 13.3 (see #242666).
    platforms = platforms.unix;
+2 −0
Original line number Diff line number Diff line
@@ -6382,10 +6382,12 @@ with pkgs;
      spidermonkey_91 = callPackage ../development/interpreters/spidermonkey/91.nix { };
      spidermonkey_115 = callPackage ../development/interpreters/spidermonkey/115.nix { };
      spidermonkey_128 = callPackage ../development/interpreters/spidermonkey/128.nix { };
      spidermonkey_140 = callPackage ../development/interpreters/spidermonkey/140.nix { };
    })
    spidermonkey_91
    spidermonkey_115
    spidermonkey_128
    spidermonkey_140
    ;

  supercollider = libsForQt5.callPackage ../development/interpreters/supercollider {