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