Skip to content

Commit

Permalink
afl: use clangStdenv
Browse files Browse the repository at this point in the history
Fixes #28712
  • Loading branch information
LnL7 committed Sep 5, 2017
1 parent 0adb83e commit 8706664
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pkgs/tools/security/afl/default.nix
@@ -1,12 +1,14 @@
{ stdenv, fetchurl, bash, callPackage, makeWrapper
, clang, llvm, which, libcgroup }:
, clang, llvm, which, libcgroup
}:

let
afl-qemu = callPackage ./qemu.nix {};
qemu-exe-name = if stdenv.system == "x86_64-linux" then "qemu-x86_64"
else if stdenv.system == "i686-linux" then "qemu-i386"
else throw "afl: no support for ${stdenv.system}!";
in

stdenv.mkDerivation rec {
name = "afl-${version}";
version = "2.48b";
Expand All @@ -23,7 +25,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
make PREFIX=$out
cd llvm_mode
make PREFIX=$out CC=${clang}/bin/clang CXX=${clang}/bin/clang++
make PREFIX=$out
cd ..
'';
installPhase = ''
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -396,7 +396,9 @@ with pkgs;

afio = callPackage ../tools/archivers/afio { };

afl = callPackage ../tools/security/afl { };
afl = callPackage ../tools/security/afl {
stdenv = clangStdenv;
};

afpfs-ng = callPackage ../tools/filesystems/afpfs-ng/default.nix { };

Expand Down

0 comments on commit 8706664

Please sign in to comment.