From 0565e1e73200063832b587fe00ec9344b2cefaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Feb 2018 07:21:23 +0000 Subject: [PATCH] afl: fix build, by switch to gcc as compiler Apparently they set CFLAGS incompatible with clang. Also only provide a default value for AFL_CC/AFL_CXX for afl-clang-fast: User might want to overriding, but this is not a PATH variable that can be prepended with :. --- pkgs/tools/security/afl/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix index 51701590b8e9..8e894884bdb6 100644 --- a/pkgs/tools/security/afl/default.nix +++ b/pkgs/tools/security/afl/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # Note: libcgroup isn't needed for building, just for the afl-cgroup # script. - buildInputs = [ makeWrapper clang llvm which ]; + buildInputs = [ makeWrapper llvm which ]; buildPhase = '' make PREFIX=$out @@ -53,8 +53,7 @@ stdenv.mkDerivation rec { for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do wrapProgram $x \ --prefix AFL_PATH : "$out/lib/afl" \ - --prefix AFL_CC : "${clang}/bin/clang" \ - --prefix AFL_CXX : "${clang}/bin/clang++" + --run 'export AFL_CC=''${AFL_CC:-${clang}/bin/clang} AFL_CXX=''${AFL_CXX:-${clang}/bin/clang++}' done '';