nixpkgs/pkgs/development/libraries/pe-parse/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
978 B
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitHub, cmake, fetchpatch }:
2020-12-24 00:14:18 +00:00
stdenv.mkDerivation rec {
pname = "pe-parse";
2022-04-27 01:27:54 +00:00
version = "2.0.0";
2020-12-24 00:14:18 +00:00
src = fetchFromGitHub {
owner = "trailofbits";
repo = "pe-parse";
rev = "v${version}";
2022-04-27 01:27:54 +00:00
hash = "sha256-HwWlMRhpB/sa/JRyAZF7LZzkXCCyuxB+gtDAfHt7e6k=";
2020-12-24 00:14:18 +00:00
};
patches = [
(fetchpatch {
url = "https://github.com/trailofbits/pe-parse/commit/eecdb3d36eb44e306398a2e66e85490f9bdcc74c.patch";
hash = "sha256-pd6D/JMctiQqJxnJU9Nm/GDVf4/CaIGeXx1UfdcCupo=";
})
];
2020-12-24 00:14:18 +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";
license = licenses.mit;
maintainers = with maintainers; [ arturcygan ];
mainProgram = "dump-pe";
platforms = platforms.unix;
2020-12-24 00:14:18 +00:00
};
}