passt: support cross compilation

This commit is contained in:
Colin
2024-05-26 08:43:21 +00:00
parent 7370c67890
commit bdade1b81e

View File

@@ -1,6 +1,8 @@
{ lib
, stdenv
, buildPackages
, fetchurl
, getconf
, gitUpdater
, testers
}:
@@ -14,6 +16,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-UK3Klpo3cp4EH42W16qh5WbZlCxb+ETQtWbpgatL/Dc=";
};
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}"