diff options
| author | Stanisław Pitucha <git@viraptor.info> | 2022-09-01 14:55:06 +1000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-09-11 01:19:50 +0000 |
| commit | 3b6a21bbd096f3eb258586ee9ed9e9c0a01787e8 (patch) | |
| tree | 65a4ffc4af53a1231353dce18564f4894c76abc3 | |
| parent | Merge pull request #190705 from NixOS/backport-190647-to-release-22.05 (diff) | |
| download | nixpkgs-origin/backport-189222-to-release-22.05.tar.gz | |
v8: fix darwin buildorigin/backport-189222-to-release-22.05
(cherry picked from commit 099df1f9acb776b45f91570a3d7de642aacd7993)
| -rw-r--r-- | pkgs/development/libraries/v8/default.nix | 11 | ||||
| -rw-r--r-- | pkgs/development/ruby-modules/gem-config/default.nix | 6 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 2b56d2e5dcf8..57bb16faecbb 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -2,6 +2,8 @@ , gn, ninja, python3, glib, pkg-config, icu , xcbuild, darwin , fetchpatch +, llvmPackages +, symlinkJoin }: # Use update.sh to update all checksums. @@ -106,6 +108,8 @@ stdenv.mkDerivation rec { touch build/config/gclient_args.gni ''; + llvmCcAndBintools = symlinkJoin { name = "llvmCcAndBintools"; paths = [ stdenv.cc llvmPackages.llvm ]; }; + gnFlags = [ "use_custom_libcxx=false" "is_clang=${lib.boolToString stdenv.cc.isClang}" @@ -123,7 +127,8 @@ stdenv.mkDerivation rec { # ''custom_toolchain="//build/toolchain/linux/unbundle:default"'' ''host_toolchain="//build/toolchain/linux/unbundle:default"'' ''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"'' - ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${stdenv.cc}"''; + ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${llvmCcAndBintools}"'' + ++ lib.optional stdenv.isDarwin ''use_lld=false''; NIX_CFLAGS_COMPILE = "-O2"; FORCE_MAC_SDK_MIN = stdenv.targetPlatform.sdkVer or "10.12"; @@ -135,7 +140,7 @@ stdenv.mkDerivation rec { python3 ] ++ lib.optionals stdenv.isDarwin [ xcbuild - darwin.DarwinTools + llvmPackages.llvm python3.pkgs.setuptools ]; buildInputs = [ glib icu ]; @@ -165,7 +170,5 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ cstrahan proglodyte matthewbauer ]; platforms = platforms.unix; license = licenses.bsd3; - # Fails to build on Darwin, see https://github.com/NixOS/nixpkgs/issues/158076 - broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 6f9da13f5034..995dc1bb5e96 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -357,6 +357,12 @@ in buildInputs = [ which v8 python2 ]; buildFlags = [ "--with-system-v8=true" ]; dontBuild = false; + # The gem includes broken symlinks which are ignored during unpacking, but + # then fail during build. Since the content is missing anyway, touching the + # files is enough to unblock the build. + preBuild = '' + touch vendor/depot_tools/cbuildbot vendor/depot_tools/chrome_set_ver vendor/depot_tools/cros_sdk + ''; postPatch = '' substituteInPlace ext/libv8/extconf.rb \ --replace "location = Libv8::Location::Vendor.new" \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24e0730bf80e..988b84218ea6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21044,7 +21044,7 @@ with pkgs; zlib = null; }; - v8 = callPackage ../development/libraries/v8 { }; + v8 = darwin.apple_sdk_11_0.callPackage ../development/libraries/v8 { }; v8_8_x = callPackage ../development/libraries/v8/8_x.nix { }; |
