nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 aflplusplus,
5}:
6
7stdenv.mkDerivation {
8 version = lib.getVersion aflplusplus;
9 pname = "libdislocator";
10
11 src = aflplusplus.src;
12 postUnpack = "chmod -R +w ${aflplusplus.src.name}";
13 sourceRoot = "${aflplusplus.src.name}/utils/libdislocator";
14
15 makeFlags = [ "PREFIX=${placeholder "out"}" ];
16
17 preInstall = ''
18 mkdir -p $out/lib/afl
19 '';
20
21 postInstall = ''
22 mkdir $out/bin
23 cat > $out/bin/get-libdislocator-so <<END
24 #!${stdenv.shell}
25 echo $out/lib/afl/libdislocator.so
26 END
27 chmod +x $out/bin/get-libdislocator-so
28 '';
29
30 meta = {
31 homepage = "https://github.com/vanhauser-thc/AFLplusplus";
32 description = ''
33 Drop-in replacement for the libc allocator which improves
34 the odds of bumping into heap-related security bugs in
35 several ways
36 '';
37 license = lib.licenses.asl20;
38 maintainers = with lib.maintainers; [
39 ris
40 msanft
41 ];
42 };
43}