2007-06-18 00:44:30 +02:00
|
|
|
{stdenv, fetchurl}:
|
2008-06-25 15:08:09 +02:00
|
|
|
|
2007-06-18 00:44:30 +02:00
|
|
|
stdenv.mkDerivation {
|
2011-11-01 18:07:07 +01:00
|
|
|
name = "lsof-4.85";
|
2007-06-18 00:34:44 +02:00
|
|
|
|
2007-06-18 00:44:30 +02:00
|
|
|
src = fetchurl {
|
2011-11-01 18:07:07 +01:00
|
|
|
url = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.85.tar.bz2;
|
|
|
|
sha256 = "1hd1aihbzx2c2p4ps4zll6nldyf9l7js59hllnnmpi1r6pk5iaj9";
|
2007-06-18 00:34:44 +02:00
|
|
|
};
|
|
|
|
|
2008-02-22 07:16:53 +01:00
|
|
|
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
|
2008-06-25 15:08:09 +02:00
|
|
|
|
2007-06-18 00:34:44 +02:00
|
|
|
preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';";
|
2008-06-25 15:08:09 +02:00
|
|
|
|
2007-06-19 19:40:42 +02:00
|
|
|
configurePhase = "./Configure -n linux;";
|
2008-06-25 15:08:09 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin $out/man/man8
|
2008-06-25 15:08:09 +02:00
|
|
|
cp lsof.8 $out/man/man8/
|
|
|
|
cp lsof $out/bin
|
|
|
|
'';
|
2007-06-26 13:49:45 +02:00
|
|
|
|
|
|
|
meta = {
|
2008-06-25 15:08:09 +02: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).
|
|
|
|
'';
|
2007-06-26 13:49:45 +02:00
|
|
|
};
|
2007-06-18 00:34:44 +02:00
|
|
|
}
|