1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

ocamlPackages.afl-persistent: init at 1.3

This commit is contained in:
sternenseemann 2020-05-21 02:22:43 +02:00 committed by Vincent Laporte
parent d89160e7b0
commit 0679fb9696
No known key found for this signature in database
GPG key ID: EBD582ADDDB1F81F
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,39 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, opaline }:
stdenv.mkDerivation rec {
pname = "afl-persistent";
version = "1.3";
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchFromGitHub {
owner = "stedolan";
repo = "ocaml-${pname}";
rev = "v${version}";
sha256 = "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i";
};
buildInputs = [ ocaml findlib ];
# don't run tests in buildPhase
# don't overwrite test binary
postPatch = ''
sed -i 's/ && \.\/test$//' build.sh
sed -i '/^ocamlopt.*test.ml -o test$/ s/$/2/' build.sh
patchShebangs build.sh
'';
buildPhase = "./build.sh";
installPhase = ''
${opaline}/bin/opaline -prefix $out -libdir $out/lib/ocaml/${ocaml.version}/site-lib/ ${pname}.install
'';
doCheck = true;
checkPhase = "./_build/test && ./_build/test2";
meta = with stdenv.lib; {
homepage = "https://github.com/stedolan/ocaml-afl-persistent";
description = "persistent-mode afl-fuzz for ocaml";
license = licenses.mit;
maintainers = [ maintainers.sternenseemann ];
};
}

View file

@ -16,6 +16,8 @@ let
buildDunePackage = callPackage ../build-support/ocaml/dune.nix {};
afl-persistent = callPackage ../development/ocaml-modules/afl-persistent { };
alcotest = callPackage ../development/ocaml-modules/alcotest {};
alcotest-lwt = callPackage ../development/ocaml-modules/alcotest/lwt.nix {};