2017-03-01 17:03:30 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, linuxHeaders }:
|
2015-04-24 23:01:10 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "trinity-${version}";
|
2015-11-08 19:09:17 +01:00
|
|
|
version = "1.6";
|
2015-04-24 23:01:10 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kernelslacker";
|
|
|
|
repo = "trinity";
|
|
|
|
rev = "v${version}";
|
2015-11-08 19:09:17 +01:00
|
|
|
sha256 = "1jwgsjjbngn2dsnkflyigy3ajd0szksl30dlaiy02jc6mqi3nr0p";
|
2015-04-24 23:01:10 +02:00
|
|
|
};
|
|
|
|
|
2017-03-01 17:03:30 +01:00
|
|
|
patches = stdenv.lib.singleton (fetchurl {
|
|
|
|
url = "https://github.com/kernelslacker/trinity/commit/b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d.patch";
|
|
|
|
sha256 = "0468fdzbsj3n3k43qm8hf56pa020qn57ripcykv9jfwp215lf0an";
|
|
|
|
});
|
|
|
|
|
|
|
|
postPatch = ''
|
2015-04-24 23:01:10 +02:00
|
|
|
patchShebangs ./configure.sh
|
|
|
|
patchShebangs ./scripts/
|
|
|
|
substituteInPlace Makefile --replace '/usr/bin/wc' 'wc'
|
2015-11-08 19:09:17 +01:00
|
|
|
substituteInPlace configure.sh --replace '/usr/include/linux' '${linuxHeaders}/include/linux'
|
2015-04-24 23:01:10 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = "./configure.sh";
|
|
|
|
|
2017-03-01 17:03:30 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-04-24 23:01:10 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|