Unverified Commit 78b310bf authored by Ben Siraphob's avatar Ben Siraphob Committed by GitHub
Browse files

fractal: fix cross compilation (#437038)

parents b0fadff8 c8281b87
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -52,6 +52,12 @@ stdenv.mkDerivation (finalAttrs: {
    ./disable-debug.patch
  ];

  postPatch = ''
    substituteInPlace src/meson.build --replace-fail \
      "'src' / rust_target / meson.project_name()" \
      "'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
  '';

  # Dirty approach to add patches after cargoSetupPostUnpackHook
  # We should eventually use a cargo vendor patch hook instead
  preConfigure = ''
@@ -104,6 +110,8 @@ stdenv.mkDerivation (finalAttrs: {
    )
  '';

  env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;

  passthru = {
    updateScript = nix-update-script { };
  };