3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/erlang/cuter/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2016-03-12 19:51:33 +00:00
{stdenv, autoconf, which, writeText, makeWrapper, fetchFromGitHub, erlang,
beamPackages, z3, python27 }:
2016-03-12 19:51:33 +00:00
stdenv.mkDerivation rec {
2017-03-02 10:51:22 +00:00
name = "cuter";
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" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
2017-03-02 10:51:22 +00:00
'';
buildInputs = with beamPackages; [ autoconf erlang z3 python27 makeWrapper which ];
2016-03-12 19:51:33 +00:00
2017-03-02 10:51:22 +00:00
buildFlags = "PWD=$(out)/lib/erlang/lib/cuter-${version} cuter_target";
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 \
--prefix PATH : "${python27}/bin" \
--suffix PYTHONPATH : "${z3}/lib/python2.7/site-packages" \
--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;
homepage = "https://github.com/aggelgian/cuter";
maintainers = with stdenv.lib.maintainers; [ ericbmerritt ];
platforms = with stdenv.lib.platforms; unix;
};
2016-03-12 19:51:33 +00:00
}