2017-03-02 12:00:25 +00:00
|
|
|
{ stdenv, autoreconfHook, which, writeText, makeWrapper, fetchFromGitHub, erlang
|
2019-06-16 20:59:06 +01:00
|
|
|
, z3, python }:
|
2016-03-12 19:51:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "cuter";
|
2017-03-02 10:51:22 +00:00
|
|
|
version = "0.1";
|
2016-03-12 19:51:33 +00:00
|
|
|
|
2017-03-02 10:51:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aggelgian";
|
|
|
|
repo = "cuter";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ax1pj6ji4w2mg3p0nh2lzmg3n9mgfxk4cf07pll51yrcfpfrnfv";
|
|
|
|
};
|
2016-03-12 19:51:33 +00:00
|
|
|
|
2017-03-02 10:51:22 +00:00
|
|
|
setupHook = writeText "setupHook.sh" ''
|
2016-03-30 18:17:59 +01:00
|
|
|
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
|
2017-03-02 10:51:22 +00:00
|
|
|
'';
|
2017-03-02 12:00:25 +00:00
|
|
|
|
2018-08-31 21:16:05 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper which ];
|
|
|
|
buildInputs = [ python python.pkgs.setuptools z3.python erlang ];
|
2016-03-12 19:51:33 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
buildFlags = [ "PWD=$(out)/lib/erlang/lib/cuter-${version}" "cuter_target" ];
|
2017-03-02 10:51:22 +00:00
|
|
|
configurePhase = ''
|
|
|
|
autoconf
|
|
|
|
./configure --prefix $out
|
|
|
|
'';
|
2016-03-12 19:51:33 +00:00
|
|
|
|
2017-03-02 10:51:22 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/erlang/lib/cuter-${version}"
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp -r * "$out/lib/erlang/lib/cuter-${version}"
|
|
|
|
cp cuter "$out/bin/cuter"
|
|
|
|
wrapProgram $out/bin/cuter \
|
2018-08-31 21:16:05 +01:00
|
|
|
--prefix PATH : "${python}/bin" \
|
|
|
|
--suffix PYTHONPATH : "${z3}/${python.sitePackages}" \
|
2017-03-02 10:51:22 +00:00
|
|
|
--suffix ERL_LIBS : "$out/lib/erlang/lib"
|
|
|
|
'';
|
2016-03-12 19:51:33 +00:00
|
|
|
|
2017-03-02 10:51:22 +00:00
|
|
|
meta = {
|
|
|
|
description = "A concolic testing tool for the Erlang functional programming language";
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/aggelgian/cuter";
|
2017-03-02 10:51:22 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
|
|
|
|
platforms = with stdenv.lib.platforms; unix;
|
|
|
|
};
|
2016-03-12 19:51:33 +00:00
|
|
|
}
|