diff options
Diffstat (limited to 'pkgs/tools/security/afl/qemu.nix')
-rw-r--r-- | pkgs/tools/security/afl/qemu.nix | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/tools/security/afl/qemu.nix b/pkgs/tools/security/afl/qemu.nix index d80d301351f..479de4b4185 100644 --- a/pkgs/tools/security/afl/qemu.nix +++ b/pkgs/tools/security/afl/qemu.nix @@ -6,7 +6,6 @@ with stdenv.lib; let qemuName = "qemu-2.10.0"; - aflName = afl.name; cpuTarget = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux-user" else if stdenv.hostPlatform.system == "i686-linux" then "i386-linux-user" else throw "afl: no support for ${stdenv.hostPlatform.system}!"; @@ -25,12 +24,12 @@ stdenv.mkDerivation { sourceRoot = qemuName; postUnpack = '' - cp ${aflName}/types.h $sourceRoot/afl-types.h - substitute ${aflName}/config.h $sourceRoot/afl-config.h \ + cp ${afl.src.name}/types.h $sourceRoot/afl-types.h + substitute ${afl.src.name}/config.h $sourceRoot/afl-config.h \ --replace "types.h" "afl-types.h" - substitute ${aflName}/qemu_mode/patches/afl-qemu-cpu-inl.h $sourceRoot/afl-qemu-cpu-inl.h \ + substitute ${afl.src.name}/qemu_mode/patches/afl-qemu-cpu-inl.h $sourceRoot/afl-qemu-cpu-inl.h \ --replace "../../config.h" "afl-config.h" - substituteInPlace ${aflName}/qemu_mode/patches/cpu-exec.diff \ + substituteInPlace ${afl.src.name}/qemu_mode/patches/cpu-exec.diff \ --replace "../patches/afl-qemu-cpu-inl.h" "afl-qemu-cpu-inl.h" ''; @@ -46,12 +45,13 @@ stdenv.mkDerivation { patches = [ # patches extracted from afl source - "../${aflName}/qemu_mode/patches/cpu-exec.diff" - "../${aflName}/qemu_mode/patches/elfload.diff" - "../${aflName}/qemu_mode/patches/syscall.diff" + "../${afl.src.name}/qemu_mode/patches/cpu-exec.diff" + "../${afl.src.name}/qemu_mode/patches/elfload.diff" + "../${afl.src.name}/qemu_mode/patches/syscall.diff" + "../${afl.src.name}/qemu_mode/patches/configure.diff" + "../${afl.src.name}/qemu_mode/patches/memfd.diff" # nix-specific patches to make installation more well-behaved ./qemu-patches/no-etc-install.patch - ./qemu-patches/qemu-2.10.0-glibc-2.27.patch ]; configureFlags = |