summary refs log tree commit diff
path: root/pkgs/os-specific/linux/trinity/default.nix
blob: a60175900cd779960ee7e5709a9f3b5d48986b17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, linuxHeaders }:

stdenv.mkDerivation rec {
  name = "trinity-${version}";
  version = "1.6";

  src = fetchFromGitHub {
    owner = "kernelslacker";
    repo = "trinity";
    rev = "v${version}";
    sha256 = "1jwgsjjbngn2dsnkflyigy3ajd0szksl30dlaiy02jc6mqi3nr0p";
  };

  patchPhase = ''
    patchShebangs ./configure.sh
    patchShebangs ./scripts/
    substituteInPlace Makefile --replace '/usr/bin/wc' 'wc'
    substituteInPlace configure.sh --replace '/usr/include/linux' '${linuxHeaders}/include/linux'
  '';

  configurePhase = "./configure.sh";

  installPhase = "make DESTDIR=$out install";

  meta = with stdenv.lib; {
    description = "A Linux System call fuzz tester";
    homepage = http://codemonkey.org.uk/projects/trinity/;
    license = licenses.gpl2;
    maintainers = [ maintainers.dezgeg ];
    platforms = platforms.linux;
  };
}