2023-09-26 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-12-24 00:14:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pe-parse";
|
2023-09-26 04:20:00 +00:00
|
|
|
version = "2.1.1";
|
2020-12-24 00:14:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trailofbits";
|
|
|
|
repo = "pe-parse";
|
|
|
|
rev = "v${version}";
|
2023-09-26 04:20:00 +00:00
|
|
|
hash = "sha256-XegSZWRoQg6NEWuTSFI1RMvN3GbpLDrZrloPU2XdK2M=";
|
2020-12-24 00:14:18 +00:00
|
|
|
};
|
|
|
|
|
2022-05-14 15:15:21 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-05-11 09:29:21 +00:00
|
|
|
|
2020-12-24 00:14:18 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
2022-04-27 01:27:54 +00:00
|
|
|
$out/bin/dump-pe ../tests/assets/example.exe
|
2020-12-24 00:14:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A principled, lightweight parser for Windows portable executable files";
|
|
|
|
homepage = "https://github.com/trailofbits/pe-parse";
|
2023-09-26 04:20:00 +00:00
|
|
|
changelog = "https://github.com/trailofbits/pe-parse/releases/tag/v${version}";
|
2020-12-24 00:14:18 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ arturcygan ];
|
2022-05-05 00:52:27 +00:00
|
|
|
mainProgram = "dump-pe";
|
|
|
|
platforms = platforms.unix;
|
2020-12-24 00:14:18 +00:00
|
|
|
};
|
|
|
|
}
|