From 078785217e816b81c8de27b7113a523ecd0fca2b Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Mon, 21 Aug 2023 13:44:45 +0530 Subject: [PATCH] Pin GNU Make to 4.3 on NixOS (#30146) Signed-off-by: Mukilan Thiyagarajan --- etc/shell.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/shell.nix b/etc/shell.nix index 9f4943efcb8..774ad7db84a 100644 --- a/etc/shell.nix +++ b/etc/shell.nix @@ -2,7 +2,12 @@ # NOTE: This does not work offline or for nix-build with import {}; - +let + pinnedSha = "6adf48f53d819a7b6e15672817fa1e78e5f4e84f"; + pinnedNixpkgs = import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/${pinnedSha}.tar.gz"; + }) {}; +in clangStdenv.mkDerivation rec { name = "servo-env"; @@ -22,6 +27,11 @@ clangStdenv.mkDerivation rec { # Build utilities cmake dbus gcc git pkg-config which llvm autoconf213 perl yasm m4 (python3.withPackages (ps: with ps; [virtualenv pip dbus])) + # This pins gnumake to 4.3 since 4.4 breaks jobserver + # functionality in mozjs and causes builds to be extremely + # slow as it behaves as if -j1 was passed. + # See https://github.com/servo/mozjs/issues/375 + pinnedNixpkgs.gnumake ] ++ (lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]);