2015-07-15 21:25:21 +02:00
|
|
|
{ stdenv, fetchurl }:
|
2008-06-25 15:08:09 +02:00
|
|
|
|
2015-07-15 21:25:21 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lsof-${version}";
|
|
|
|
version = "4.89";
|
2007-06-18 00:34:44 +02:00
|
|
|
|
2007-06-18 00:44:30 +02:00
|
|
|
src = fetchurl {
|
2015-07-29 17:46:05 +02:00
|
|
|
urls = map (
|
|
|
|
# the tarball is moved after new version is released
|
|
|
|
isOld: "ftp://sunsite.ualberta.ca/pub/Mirror/lsof/"
|
|
|
|
+ "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
|
|
|
|
) [ false true ];
|
2015-07-15 21:25:21 +02:00
|
|
|
sha256 = "061p18v0mhzq517791xkjs8a5dfynq1418a1mwxpji69zp2jzb41";
|
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
|
|
|
|
2014-04-12 18:05:25 +02:00
|
|
|
configurePhase = if stdenv.isDarwin
|
|
|
|
then "./Configure -n darwin;"
|
|
|
|
else "./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).
|
|
|
|
'';
|
2014-09-13 13:51:39 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.mornfall ];
|
2007-06-26 13:49:45 +02:00
|
|
|
};
|
2007-06-18 00:34:44 +02:00
|
|
|
}
|