about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/lsof
diff options
context:
space:
mode:
authorAverell Dalton <averell+nixpkgs@rxd4.com>2019-08-29 00:17:25 +0200
committerAverell Dalton <averell+nixpkgs@rxd4.com>2019-08-30 06:51:12 +0200
commita7a6528c611351fc38bb3e42a25550ce4943b106 (patch)
treef9d9aaeb886429a7cbaa064285243ef41c568896 /pkgs/development/tools/misc/lsof
parent17a5cb6cb5a49f93ca2e59a2180d127546de9c1a (diff)
downloadnixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar.gz
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar.bz2
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar.lz
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar.xz
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.tar.zst
nixlib-a7a6528c611351fc38bb3e42a25550ce4943b106.zip
lsof: 4.91 -> 4.93.2
Diffstat (limited to 'pkgs/development/tools/misc/lsof')
-rw-r--r--pkgs/development/tools/misc/lsof/darwin-dfile.patch12
-rw-r--r--pkgs/development/tools/misc/lsof/default.nix34
2 files changed, 11 insertions, 35 deletions
diff --git a/pkgs/development/tools/misc/lsof/darwin-dfile.patch b/pkgs/development/tools/misc/lsof/darwin-dfile.patch
deleted file mode 100644
index 9952228e613a..000000000000
--- a/pkgs/development/tools/misc/lsof/darwin-dfile.patch
+++ /dev/null
@@ -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) */
- 
- 
diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix
index 63003f338eb9..98acccb252a3 100644
--- a/pkgs/development/tools/misc/lsof/default.nix
+++ b/pkgs/development/tools/misc/lsof/default.nix
@@ -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,