Unverified Commit 1f0c218b authored by Colin's avatar Colin Committed by GitHub
Browse files

the-legend-of-edgar: fix cross (#428875)

parents 1ff4ac5e 6d24712a
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  buildPackages,
  SDL2,
  SDL2_image,
  SDL2_mixer,
@@ -31,11 +32,25 @@ stdenv.mkDerivation (finalAttrs: {
      url = "https://github.com/riksweeney/edgar/commit/cec80a04d765fd2f6563d1cf060ad5000f9efe0a.patch";
      hash = "sha256-RJpIt7M3c989nXkWRTY+dIUGqqttyTTGx8s5u/iTWX4=";
    })

    (fetchpatch {
      # https://github.com/riksweeney/edgar/pull/68
      name = "add-cross-compilation-support.patch";
      url = "https://github.com/riksweeney/edgar/commit/9cc071d06b97e20aee3841c2eaa8078c6ed396d7.patch";
      hash = "sha256-+yHzLgqBI8qgD40pSCmwF68SDDnC/4QdCXEz/g7l0a4=";
    })
  ];

  strictDeps = true;

  depsBuildBuild = [
    buildPackages.stdenv.cc
    pkg-config
  ];
  nativeBuildInputs = [
    pkg-config
    gettext
    zlib
  ];

  buildInputs = [
@@ -54,6 +69,8 @@ stdenv.mkDerivation (finalAttrs: {
  makeFlags = [
    "PREFIX=${placeholder "out"}"
    "BIN_DIR=${placeholder "out"}/bin/"
    "BUILD_CC=$(CC_FOR_BUILD)"
    "BUILD_PKG_CONFIG=$(PKG_CONFIG_FOR_BUILD)"
  ];

  enableParallelBuilding = true;