lsof: 4.91 -> 4.93.2

This commit is contained in:
Averell Dalton 2019-08-29 00:17:25 +02:00
parent 17a5cb6cb5
commit a7a6528c61
2 changed files with 11 additions and 35 deletions

View file

@ -1,12 +0,0 @@
diff -Naur a/dialects/darwin/libproc/dfile.c b/dialects/darwin/libproc/dfile.c
--- a/dialects/darwin/libproc/dfile.c 2018-02-14 09:28:06.000000000 -0500
+++ b/dialects/darwin/libproc/dfile.c 2018-04-16 18:52:40.828715293 -0400
@@ -43,7 +43,7 @@
#include "lsof.h"
#if defined(PROC_FP_GUARDED)
-#extern struct pff_tab Pgf_tab[];
+extern struct pff_tab Pgf_tab[];
#endif /* defined(PROC_FP_GUARDED) */

View file

@ -1,34 +1,22 @@
{ stdenv, fetchurl, buildPackages, ncurses }:
{ stdenv, fetchFromGitHub, buildPackages, ncurses }:
let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
stdenv.mkDerivation rec {
name = "lsof-${version}";
version = "4.91";
pname = "lsof";
version = "4.93.2";
depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = [ ncurses ];
src = fetchurl {
urls = ["https://fossies.org/linux/misc/lsof_${version}.tar.bz2"] ++ # Mirrors seem to be down...
["ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${version}.tar.bz2"]
++ 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 ]
++ map (
# the tarball is moved after new version is released
isOld: "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/"
+ "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
) [ false true ]
;
sha256 = "18sh4hbl9jw2szkf0gvgan8g13f3g4c6s2q9h3zq5gsza9m99nn9";
src = fetchFromGitHub {
owner = "lsof-org";
repo = "lsof";
rev = "${version}";
sha256 = "1gd6r0nv8xz76pmvk52dgmfl0xjvkxl0s51b4jk4a0lphw3393yv";
};
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
patches = [ ./no-build-info.patch ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-dfile.patch;
patches = [ ./no-build-info.patch ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
@ -47,12 +35,12 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin $out/man/man8
cp lsof.8 $out/man/man8/
cp Lsof.8 $out/man/man8/lsof.8
cp lsof $out/bin
'';
meta = with stdenv.lib; {
homepage = https://people.freebsd.org/~abe/;
homepage = "https://github.com/lsof-org/lsof";
description = "A tool to list open files";
longDescription = ''
List open files. Can show what process has opened some file,