Unverified Commit 8ee63a65 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

passt: support cross compilation (#334097)

parents fe0ab274 bdade1b8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPackages
, fetchurl
, getconf
, gitUpdater
, testers
}:
@@ -14,6 +16,12 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-Qf1neJOkYXR5p9Owk60qtc22A+au4EY45Qt9PfJ+Lrs=";
  };

  postPatch = ''
    substituteInPlace Makefile --replace-fail \
      'PAGE_SIZE=$(shell getconf PAGE_SIZE)' \
      "PAGE_SIZE=$(${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe getconf} PAGE_SIZE)"
  '';

  makeFlags = [
    "prefix=${placeholder "out"}"
    "VERSION=${finalAttrs.version}"