1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "pe-parse";
5 version = "2.1.1";
6
7 src = fetchFromGitHub {
8 owner = "trailofbits";
9 repo = "pe-parse";
10 rev = "v${version}";
11 hash = "sha256-XegSZWRoQg6NEWuTSFI1RMvN3GbpLDrZrloPU2XdK2M=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 doInstallCheck = true;
17 installCheckPhase = ''
18 $out/bin/dump-pe ../tests/assets/example.exe
19 '';
20
21 meta = with lib; {
22 description = "A principled, lightweight parser for Windows portable executable files";
23 homepage = "https://github.com/trailofbits/pe-parse";
24 changelog = "https://github.com/trailofbits/pe-parse/releases/tag/v${version}";
25 license = licenses.mit;
26 maintainers = with maintainers; [ arturcygan ];
27 mainProgram = "dump-pe";
28 platforms = platforms.unix;
29 };
30}