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 {
|
2009-02-11 00:11:29 +01:00
|
|
|
name = "lsof-4.81";
|
2007-06-18 00:34:44 +02:00
|
|
|
|
2007-06-18 00:44:30 +02:00
|
|
|
src = fetchurl {
|
2008-06-25 15:08:09 +02:00
|
|
|
urls = [
|
2009-02-11 22:51:05 +01:00
|
|
|
http://ftp.uni-bayreuth.de/packages/tools/lsof/lsof_4.81.tar.bz2
|
2009-02-11 00:11:29 +01:00
|
|
|
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.81.tar.bz2
|
|
|
|
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/lsof_4.81.tar.bz2
|
2008-06-25 15:08:09 +02:00
|
|
|
];
|
2009-02-11 00:11:29 +01:00
|
|
|
sha256 = "1fcamd8qpczgb3kz9b2rhflbq6lyd3lic4i7xl7n99fx76ha1n19";
|
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 = ''
|
|
|
|
ensureDir $out/bin $out/man/man8
|
|
|
|
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
|
|
|
}
|