2007-06-17 23:44:30 +01:00
|
|
|
{stdenv, fetchurl}:
|
2008-06-25 14:08:09 +01:00
|
|
|
|
2007-06-17 23:44:30 +01:00
|
|
|
stdenv.mkDerivation {
|
2013-03-07 18:23:43 +00:00
|
|
|
name = "lsof-4.87";
|
2007-06-17 23:34:44 +01:00
|
|
|
|
2007-06-17 23:44:30 +01:00
|
|
|
src = fetchurl {
|
2013-03-07 18:23:43 +00:00
|
|
|
url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.87.tar.bz2;
|
|
|
|
sha256 = "0b6si72sml7gr9784ak491cxxbm9mx5bh174yg6rrirbv04kgpfz";
|
2007-06-17 23:34:44 +01:00
|
|
|
};
|
|
|
|
|
2008-02-22 06:16:53 +00:00
|
|
|
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
|
2008-06-25 14:08:09 +01:00
|
|
|
|
2007-06-17 23:34:44 +01:00
|
|
|
preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';";
|
2008-06-25 14:08:09 +01:00
|
|
|
|
2014-04-12 17:05:25 +01:00
|
|
|
configurePhase = if stdenv.isDarwin
|
|
|
|
then "./Configure -n darwin;"
|
|
|
|
else "./Configure -n linux;";
|
2008-06-25 14:08:09 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin $out/man/man8
|
2008-06-25 14:08:09 +01:00
|
|
|
cp lsof.8 $out/man/man8/
|
|
|
|
cp lsof $out/bin
|
|
|
|
'';
|
2007-06-26 12:49:45 +01:00
|
|
|
|
|
|
|
meta = {
|
2008-06-25 14:08:09 +01:00
|
|
|
homepage = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/;
|
|
|
|
description = "A tool to list open files";
|
|
|
|
longDescription = ''
|
|
|
|
List open files. Can show what process has opened some file,
|
|
|
|
socket (IPv6/IPv4/UNIX local), or partition (by opening a file
|
|
|
|
from it).
|
|
|
|
'';
|
2014-09-13 12:51:39 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.mornfall ];
|
2007-06-26 12:49:45 +01:00
|
|
|
};
|
2007-06-17 23:34:44 +01:00
|
|
|
}
|