openipmi: fix cross compilation

(cherry picked from commit 6f8fa26d6f6ebdcf51964ddcbf33e160f8d8436d)
This commit is contained in:
Sandro Jäckel
2025-10-04 03:42:51 +02:00
parent 1d76f7853a
commit 0ae8841c9d

View File

@@ -1,5 +1,6 @@
{
stdenv,
buildPackages,
fetchurl,
popt,
ncurses,
@@ -18,6 +19,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-xi049dp99Cmaw6ZSUI6VlTd1JEAYHjTHayrs69fzAbk=";
};
postConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
substituteInPlace lanserv/Makefile \
--replace-fail "sdrcomp/sdrcomp_build -o" "${buildPackages.openipmi}/bin/sdrcomp -o"
'';
strictDeps = true;
nativeBuildInputs = [
python3
];
buildInputs = [
ncurses
popt
@@ -26,6 +38,10 @@ stdenv.mkDerivation rec {
openssl
];
makeFlags = [
"BUILD_CC=${stdenv.cc.targetPrefix}cc"
];
outputs = [
"out"
"lib"