lsof: stop configure script from searching /usr paths

This commit is contained in:
Allen Nelson 2016-04-25 11:14:22 -05:00
parent 7e92ae903e
commit b48e1dd601

View File

@ -16,13 +16,15 @@ stdenv.mkDerivation rec {
}; };
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); "; unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';"; preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';";
configurePhase = if stdenv.isDarwin configurePhase = ''
then "./Configure -n darwin;" # Stop build scripts from searching global include paths
else "./Configure -n linux;"; export LSOF_INCLUDE=/$(md5sum <(echo $name) | awk '{print $1}')
./Configure -n ${if stdenv.isDarwin then "darwin" else "linux"}
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/man/man8 mkdir -p $out/bin $out/man/man8
cp lsof.8 $out/man/man8/ cp lsof.8 $out/man/man8/