2018-04-26 07:21:58 -07:00
|
|
|
{ lib, stdenv, fetchurl, ncurses, pkgconfig }:
|
2013-01-23 08:12:20 -08:00
|
|
|
|
2017-04-11 02:55:36 -07:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "procps-${version}";
|
2018-06-01 12:25:27 -07:00
|
|
|
version = "3.3.15";
|
2013-01-23 08:12:20 -08:00
|
|
|
|
2018-04-26 07:21:58 -07:00
|
|
|
# The project's releases are on SF, but git repo on gitlab.
|
2018-04-19 11:10:34 -07:00
|
|
|
src = fetchurl {
|
2018-04-26 07:21:58 -07:00
|
|
|
url = "mirror://sourceforge/procps-ng/procps-ng-${version}.tar.xz";
|
2018-06-01 12:25:27 -07:00
|
|
|
sha256 = "0r84kwa5fl0sjdashcn4vh7hgfm7ahdcysig3mcjvpmkzi7p9g8h";
|
2013-01-23 08:12:20 -08:00
|
|
|
};
|
|
|
|
|
2015-06-19 05:13:25 -07:00
|
|
|
buildInputs = [ ncurses ];
|
2018-04-26 07:21:58 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2013-01-23 08:12:20 -08:00
|
|
|
|
2018-07-08 10:42:21 -07:00
|
|
|
makeFlags = [ "usrbin_execdir=$(out)/bin" ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "watch" "PKG_LDFLAGS="];
|
2013-01-23 08:12:20 -08:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-10-22 12:21:01 -07:00
|
|
|
# Too red
|
2017-10-29 10:50:33 -07:00
|
|
|
configureFlags = [ "--disable-modern-top" ]
|
|
|
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
[ "ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes" ];
|
2015-06-19 05:13:25 -07:00
|
|
|
|
2018-07-08 10:42:21 -07:00
|
|
|
installPhase = if stdenv.isDarwin then ''
|
|
|
|
install -m 0755 -D watch $out/bin/watch
|
|
|
|
install -m 0644 -D watch.1 $out/share/man/man1/watch.1
|
|
|
|
'' else null;
|
|
|
|
|
2015-06-19 05:13:25 -07:00
|
|
|
meta = {
|
2018-03-24 03:50:10 -07:00
|
|
|
homepage = https://gitlab.com/procps-ng/procps;
|
2013-01-23 08:12:20 -08:00
|
|
|
description = "Utilities that give information about processes using the /proc filesystem";
|
|
|
|
priority = 10; # less than coreutils, which also provides "kill" and "uptime"
|
2015-06-19 05:13:25 -07:00
|
|
|
license = lib.licenses.gpl2;
|
2018-07-08 10:42:21 -07:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.cygwin ++ lib.platforms.darwin;
|
2018-03-24 04:03:04 -07:00
|
|
|
maintainers = [ lib.maintainers.typetetris ];
|
2013-01-23 08:12:20 -08:00
|
|
|
};
|
|
|
|
}
|