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.

33 lines
851 B
Nix
Raw Normal View History

2020-12-24 00:14:18 +00:00
{ stdenv, lib, fetchFromGitHub, cmake }:
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
};
nativeBuildInputs = [ cmake ];
2022-05-11 09:29:21 +00:00
# See https://github.com/trailofbits/pe-parse/issues/169
NIX_CFLAGS_COMPILE = "-Wno-sign-conversion";
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
};
}