From 2e1a7b94f3c85c982da8cd659e7a8d563fd3cbc0 Mon Sep 17 00:00:00 2001 From: Ivan Babrou Date: Fri, 26 Feb 2021 20:20:19 -0800 Subject: [PATCH] ocamlPackages.ocaml: fix assembler detection for aarch64-darwin --- pkgs/development/compilers/ocaml/generic.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index d4a6b6250b5..d9853dd642a 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -66,6 +66,10 @@ stdenv.mkDerivation (args // { preConfigure = optionalString (!lib.versionAtLeast version "4.04") '' CAT=$(type -tp cat) sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang + '' + optionalString (stdenv.isDarwin && stdenv.isAarch64) '' + # Do what upstream does by default now: https://github.com/ocaml/ocaml/pull/10176 + # This is required for aarch64-darwin, everything else works as is. + AS="${stdenv.cc}/bin/cc -c" ASPP="${stdenv.cc}/bin/cc -c" ''; postBuild = '' mkdir -p $out/include