]> jfr.im git - irc/rizon/plexus4.git/commitdiff
Add afl support in nix expression.
authorDarius Jahandarie <redacted>
Fri, 12 Feb 2016 02:30:53 +0000 (21:30 -0500)
committerDarius Jahandarie <redacted>
Tue, 15 Nov 2016 17:48:55 +0000 (12:48 -0500)
default.nix

index 261361c8c7e6cbed51fb2af00ca9d1994999d192..746aa288c0c623002c551d7122cf1617d4950309 100644 (file)
@@ -1,4 +1,4 @@
-{ production ? false, check ? true }:
+{ production ? false, check ? true, fuzz ? false }:
 with (import <nixpkgs> {}); stdenv.mkDerivation rec {
   name = "plexus";
 
@@ -29,6 +29,11 @@ with (import <nixpkgs> {}); stdenv.mkDerivation rec {
       []
     else
       []
+  ) ++ (
+    if fuzz then
+      [afl]
+    else
+      []
   );
 
   configureFlags = [
@@ -39,6 +44,11 @@ with (import <nixpkgs> {}); stdenv.mkDerivation rec {
       []
     else
       ["--enable-debugging" "--enable-assert"]
+  ) ++ (
+    if fuzz then
+      ["CC=afl-gcc"]
+    else
+      []
   );
 
   dontStrip = !production;