Merge pull request #14979 from adnelson/purify_lsof

lsof: stop configure script from searching /usr paths
This commit is contained in:
Michael Raskin 2016-04-25 16:29:59 +00:00
commit 496b751313

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/