mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 21:07:53 +00:00
procdump: 1.0.1 -> 1.1 (#75658)
This commit is contained in:
parent
e6b29634d2
commit
ee7ed8da31
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user