1{ stdenv, fetchFromGitHub, linuxHeaders }:
2
3stdenv.mkDerivation rec {
4 name = "trinity-${version}";
5 version = "1.6";
6
7 src = fetchFromGitHub {
8 owner = "kernelslacker";
9 repo = "trinity";
10 rev = "v${version}";
11 sha256 = "1jwgsjjbngn2dsnkflyigy3ajd0szksl30dlaiy02jc6mqi3nr0p";
12 };
13
14 patchPhase = ''
15 patchShebangs ./configure.sh
16 patchShebangs ./scripts/
17 substituteInPlace Makefile --replace '/usr/bin/wc' 'wc'
18 substituteInPlace configure.sh --replace '/usr/include/linux' '${linuxHeaders}/include/linux'
19 '';
20
21 configurePhase = "./configure.sh";
22
23 installPhase = "make DESTDIR=$out install";
24
25 meta = with stdenv.lib; {
26 description = "A Linux System call fuzz tester";
27 homepage = http://codemonkey.org.uk/projects/trinity/;
28 license = licenses.gpl2;
29 maintainers = [ maintainers.dezgeg ];
30 platforms = platforms.linux;
31 };
32}