@@ -0,0 +1,28 @@
1+{ stdenv, lib, fetchFromGitHub, cmake }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "pe-parse";
5+ version = "1.2.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "trailofbits";
9+ repo = "pe-parse";
10+ rev = "v${version}";
11+ sha256 = "1jvfjaiwddczjlx4xdhpbgwvvpycab7ix35lwp3wfy44hs6qpjqv";
12+ };
13+
14+ nativeBuildInputs = [ cmake ];
15+
16+ doInstallCheck = true;
17+ installCheckPhase = ''
18+ $out/bin/dump-pe ../test/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+ license = licenses.mit;
25+ platforms = platforms.unix;
26+ maintainers = with maintainers; [ arturcygan ];
27+ };
28+}