From ee7ed8da31e2eb3f83ffd63b9338750306c79402 Mon Sep 17 00:00:00 2001 From: Renaud Date: Sat, 14 Dec 2019 20:25:04 +0100 Subject: [PATCH] procdump: 1.0.1 -> 1.1 (#75658) --- pkgs/os-specific/linux/procdump/default.nix | 31 +++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/pkgs/os-specific/linux/procdump/default.nix b/pkgs/os-specific/linux/procdump/default.nix index 0185d3022bc2..d24f665cc7ca 100644 --- a/pkgs/os-specific/linux/procdump/default.nix +++ b/pkgs/os-specific/linux/procdump/default.nix @@ -1,28 +1,19 @@ -{ stdenv, fetchFromGitHub, fetchpatch, bash, coreutils, gdb, zlib }: +{ stdenv, fetchFromGitHub, bash, coreutils, gdb, zlib }: stdenv.mkDerivation rec { pname = "procdump"; - version = "1.0.1"; + version = "1.1"; src = fetchFromGitHub { owner = "Microsoft"; repo = "ProcDump-for-Linux"; rev = version; - sha256 = "1lkm05hq4hl1vadj9ifm18hi7cbf5045xlfxdfbrpsl6kxgfwcc4"; + sha256 = "1pcf6cpslpazla0na0q680dih9wb811q5irr7d2zmw0qmxm33jw2"; }; nativeBuildInputs = [ zlib ]; buildInputs = [ bash coreutils gdb ]; - patches = [ - # Fix name conflict when built with musl - # TODO: check if fixed upstream https://github.com/Microsoft/ProcDump-for-Linux/pull/50 - (fetchpatch { - url = "https://github.com/Microsoft/ProcDump-for-Linux/commit/1b7b50b910f20b463fb628c8213663c8a8d11d0d.patch"; - sha256 = "0h0dj3gi6hw1wdpc0ih9s4kkagv0d9jzrg602cr85r2z19lmb7yk"; - }) - ]; - postPatch = '' substituteInPlace src/CoreDumpWriter.c \ --replace '"gcore ' '"${gdb}/bin/gcore ' \ @@ -31,16 +22,26 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "DESTDIR=$(out)" + "DESTDIR=${placeholder "out"}" "INSTALLDIR=/bin" "MANDIR=/share/man/man1" ]; - doCheck = false; # needs root + doCheck = false; # needs sudo root + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + set +o pipefail + ($out/bin/procdump -h | grep "ProcDump v${version}") || + (echo "ERROR: ProcDump is not the expected version or does not run properly" ; exit 1) + set -o pipefail + runHook postInstallCheck + ''; meta = with stdenv.lib; { description = "A Linux version of the ProcDump Sysinternals tool"; - homepage = https://github.com/Microsoft/ProcDump-for-Linux; + homepage = "https://github.com/Microsoft/ProcDump-for-Linux"; license = licenses.mit; maintainers = with maintainers; [ c0bw3b ]; platforms = platforms.linux;