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