Unverified Commit b1b1d927 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

mlx42: fix build with clang (#373838)

parents c043dd9f ddeac5d0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  glfw,
  enableShared ? !stdenv.hostPlatform.isStatic,
@@ -19,6 +20,16 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-/HCP6F7N+J97n4orlLxg/4agEoq4+rJdpeW/3q+DI1I=";
  };

  patches = [
    # clang no longer allows using -Ofast
    # see: https://github.com/codam-coding-college/MLX42/issues/147
    (fetchpatch {
      name = "replace-ofast-with-o3.patch";
      url = "https://github.com/codam-coding-college/MLX42/commit/ce254c3a19af8176787601a2ac3490100a5c4c61.patch";
      hash = "sha256-urL/WVOXinf7hWR5kH+bAVTcAzldkkWfY0+diSf7jHE=";
    })
  ];

  postPatch =
    ''
      patchShebangs --build ./tools