3
0
Fork 0
forked from mirrors/nixpkgs

nmon: fix cross-compiling

This commit is contained in:
Julien Moutinho 2021-10-19 21:11:38 +02:00
parent ab8489cc40
commit 85a18cf3fe

View file

@ -11,7 +11,13 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ];
dontUnpack = true;
buildPhase = "cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D X86";
buildPhase = "${stdenv.cc.targetPrefix}cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D ${
with stdenv.targetPlatform;
if isx86_32 || isx86_64 then "X86"
else if isAarch32 || isAarch64 then "ARM"
else if isPower then "POWER"
else "UNKNOWN"
}";
installPhase = ''
mkdir -p $out/bin
cp nmon $out/bin