diff --git a/pkgs/by-name/op/openipmi/package.nix b/pkgs/by-name/op/openipmi/package.nix index 0aec715128c1..fada75ad48cb 100644 --- a/pkgs/by-name/op/openipmi/package.nix +++ b/pkgs/by-name/op/openipmi/package.nix @@ -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"