nixpkgs/pkgs/development/tools/erlang/cuter/default.nix
Matthew Bauer 02297beade treewide: add version to packages
Lots of packages are missing versions in their name. This adds them
where appropriate. These were found with this command:

 $ nix-env -qa -f. | grep -v '\-[0-9A-Za-z.-_+]*$' | grep -v '^hook$'

See issue #41007.
2018-05-25 15:48:05 -05:00

46 lines
1.4 KiB
Nix

{ stdenv, autoreconfHook, which, writeText, makeWrapper, fetchFromGitHub, erlang
, beamPackages, z3, python27 }:
stdenv.mkDerivation rec {
name = "cuter-${version}";
version = "0.1";
src = fetchFromGitHub {
owner = "aggelgian";
repo = "cuter";
rev = "v${version}";
sha256 = "1ax1pj6ji4w2mg3p0nh2lzmg3n9mgfxk4cf07pll51yrcfpfrnfv";
};
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = with beamPackages; [ python27.pkgs.setuptools erlang z3 python27 makeWrapper which ];
buildFlags = "PWD=$(out)/lib/erlang/lib/cuter-${version} cuter_target";
configurePhase = ''
autoconf
./configure --prefix $out
'';
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"
'';
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;
};
}