diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2019-01-05 16:58:51 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2019-01-05 17:22:24 +0100 |
commit | e2b79b10b57ac5b4484a94f4e54e87297d7c9591 (patch) | |
tree | 78571ba678cfda4ba47f8c1e490e88c2958933d7 /pkgs/tools/security/afl | |
parent | 5da3d039d4b6b5d46c39b3cd22223f02bb02bf3f (diff) |
afl: various cleanups
Diffstat (limited to 'pkgs/tools/security/afl')
-rw-r--r-- | pkgs/tools/security/afl/default.nix | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index 067d355fb9012..c90d031e989bb 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -15,21 +15,18 @@ let url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz"; sha256 = "0ig0ij4n1pwry5dw1hk4q88801jzzy2cric6y2gd6560j55lnqa3"; }; + enableParallelBuilding = true; # Note: libcgroup isn't needed for building, just for the afl-cgroup # script. - buildInputs = [ makeWrapper llvm which ]; + nativeBuildInputs = [ makeWrapper which ]; + buildInputs = [ llvm ]; - buildPhase = '' - make PREFIX=$out - cd llvm_mode - make PREFIX=$out - cd .. + makeFlags = [ "PREFIX=$(out)" ]; + postBuild = '' + make -C llvm_mode $makeFlags -j$NIX_BUILD_CORES ''; - installPhase = '' - # Do the normal installation - make install PREFIX=$out - + postInstall = '' # Install the custom QEMU emulator for binary blob fuzzing. cp ${afl-qemu}/bin/${qemu-exe-name} $out/bin/afl-qemu-trace @@ -55,9 +52,7 @@ let done ''; - passthru = { - qemu = afl-qemu; - }; + passthru.qemu = afl-qemu; meta = { description = "Powerful fuzzer via genetic algorithms and instrumentation"; @@ -78,5 +73,3 @@ let }; }; in afl - - |