Commit 619bacbb authored by Colin's avatar Colin
Browse files

loupe: fix cross compilation

parent cadd6c49
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -37,6 +37,12 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-PKkyZDd4FLWGZ/kDKWkaSV8p8NDniSQGcR9Htce6uCg=";
  };

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

  nativeBuildInputs = [
    cargo
    desktop-file-utils
@@ -73,6 +79,9 @@ stdenv.mkDerivation (finalAttrs: {
    )
  '';

  # For https://gitlab.gnome.org/GNOME/loupe/-/blob/0e6ddb0227ac4f1c55907f8b43eaef4bb1d3ce70/src/meson.build#L34-35
  env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;

  passthru = {
    updateScript =
      let