From bdade1b81eb00a74beade2add657c5258a0f65a9 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 26 May 2024 08:43:21 +0000 Subject: [PATCH] passt: support cross compilation --- pkgs/by-name/pa/passt/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/pa/passt/package.nix b/pkgs/by-name/pa/passt/package.nix index 8db2c9a981e4..dd0161aee07a 100644 --- a/pkgs/by-name/pa/passt/package.nix +++ b/pkgs/by-name/pa/passt/package.nix @@ -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}"