git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #67658 from averelld/lsof-update

lsof: 4.91 -> 4.93.2

commitd9e7601926990ae3ece73d248a518548e2840018 authorMarek Mahut <marek.mahut@gmail.com> dateFri 30 Aug 2019, 10:17 (7 years ago) parent5c20107a7a6528
2 files changed+11−35
pkgs/development/tools/misc/lsof/darwin-dfile.patch−12 pkgs/development/tools/misc/lsof/default.nix+11−23
pkgs/development/tools/misc/lsof/darwin-dfile.patchdeleted−12
@@ -1,12 +0,0 @@
1−diff -Naur a/dialects/darwin/libproc/dfile.c b/dialects/darwin/libproc/dfile.c
2−--- a/dialects/darwin/libproc/dfile.c 2018-02-14 09:28:06.000000000 -0500
3−+++ b/dialects/darwin/libproc/dfile.c 2018-04-16 18:52:40.828715293 -0400
4−@@ -43,7 +43,7 @@
5− #include "lsof.h"
6−
7− #if defined(PROC_FP_GUARDED)
8−-#extern struct pff_tab Pgf_tab[];
9−+extern struct pff_tab Pgf_tab[];
10− #endif /* defined(PROC_FP_GUARDED) */
11−
12−
pkgs/development/tools/misc/lsof/default.nix+11−23
@@ -1,34 +1,22 @@
1−{ stdenv, fetchurl, buildPackages, ncurses }:
1+{ stdenv, fetchFromGitHub, buildPackages, ncurses }:
22
33let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
44
55stdenv.mkDerivation rec {
6− name = "lsof-${version}";
7− version = "4.91";
6+ pname = "lsof";
7+ version = "4.93.2";
88
99 depsBuildBuild = [ buildPackages.stdenv.cc ];
1010 buildInputs = [ ncurses ];
1111
12− src = fetchurl {
13− urls = ["https://fossies.org/linux/misc/lsof_${version}.tar.bz2"] ++ # Mirrors seem to be down...
14− ["ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${version}.tar.bz2"]
15− ++ map (
16− # the tarball is moved after new version is released
17− isOld: "ftp://sunsite.ualberta.ca/pub/Mirror/lsof/"
18− + "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
19− ) [ false true ]
20− ++ map (
21− # the tarball is moved after new version is released
22− isOld: "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/"
23− + "${stdenv.lib.optionalString isOld "OLD/"}lsof_${version}.tar.bz2"
24− ) [ false true ]
25− ;
26− sha256 = "18sh4hbl9jw2szkf0gvgan8g13f3g4c6s2q9h3zq5gsza9m99nn9";
12+ src = fetchFromGitHub {
13+ owner = "lsof-org";
14+ repo = "lsof";
15+ rev = "${version}";
16+ sha256 = "1gd6r0nv8xz76pmvk52dgmfl0xjvkxl0s51b4jk4a0lphw3393yv";
2717 };
2818
29− unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*/); ";
30−
31− patches = [ ./no-build-info.patch ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-dfile.patch;
19+ patches = [ ./no-build-info.patch ];
3220
3321 postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
3422 substituteInPlace dialects/linux/dlsof.h --replace "defined(__UCLIBC__)" 1
@@ -47,12 +35,12 @@ stdenv.mkDerivation rec {
4735
4836 installPhase = ''
4937 mkdir -p $out/bin $out/man/man8
50− cp lsof.8 $out/man/man8/
38+ cp Lsof.8 $out/man/man8/lsof.8
5139 cp lsof $out/bin
5240 '';
5341
5442 meta = with stdenv.lib; {
55− homepage = https://people.freebsd.org/~abe/;
43+ homepage = "https://github.com/lsof-org/lsof";
5644 description = "A tool to list open files";
5745 longDescription = ''
5846 List open files. Can show what process has opened some file,