Unverified Commit 64aedcda authored by Seth Flynn's avatar Seth Flynn Committed by GitHub
Browse files

spot: fix cross compilation (#437722)

parents 93a095c9 09558b2d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -40,6 +40,12 @@ stdenv.mkDerivation rec {
    hash = "sha256-731aD+yJkyrNMmYtgKYzXIAyLegDBzTT2XqZs5usXiI=";
  };

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

  nativeBuildInputs = [
    appstream-glib
    blueprint-compiler
@@ -71,6 +77,9 @@ stdenv.mkDerivation rec {
  # https://github.com/xou816/spot/issues/313
  mesonBuildType = "release";

  # For https://github.com/xou816/spot/blob/21ee601f655caa4ca9cae1033a27459fe6289318/src/meson.build#L122
  env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;

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