at 23.05-pre 36 lines 978 B view raw
1{ stdenv, lib, fetchFromGitHub, cmake, fetchpatch }: 2 3stdenv.mkDerivation rec { 4 pname = "pe-parse"; 5 version = "2.0.0"; 6 7 src = fetchFromGitHub { 8 owner = "trailofbits"; 9 repo = "pe-parse"; 10 rev = "v${version}"; 11 hash = "sha256-HwWlMRhpB/sa/JRyAZF7LZzkXCCyuxB+gtDAfHt7e6k="; 12 }; 13 14 patches = [ 15 (fetchpatch { 16 url = "https://github.com/trailofbits/pe-parse/commit/eecdb3d36eb44e306398a2e66e85490f9bdcc74c.patch"; 17 hash = "sha256-pd6D/JMctiQqJxnJU9Nm/GDVf4/CaIGeXx1UfdcCupo="; 18 }) 19 ]; 20 21 nativeBuildInputs = [ cmake ]; 22 23 doInstallCheck = true; 24 installCheckPhase = '' 25 $out/bin/dump-pe ../tests/assets/example.exe 26 ''; 27 28 meta = with lib; { 29 description = "A principled, lightweight parser for Windows portable executable files"; 30 homepage = "https://github.com/trailofbits/pe-parse"; 31 license = licenses.mit; 32 maintainers = with maintainers; [ arturcygan ]; 33 mainProgram = "dump-pe"; 34 platforms = platforms.unix; 35 }; 36}