From 98b4d19a0b47c083f992c20bba01196ac8b07791 Mon Sep 17 00:00:00 2001 From: Eric Merritt Date: Sat, 12 Mar 2016 11:51:33 -0800 Subject: [PATCH] cuter: init at 0.1 --- .../tools/erlang/cuter/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/tools/erlang/cuter/default.nix diff --git a/pkgs/development/tools/erlang/cuter/default.nix b/pkgs/development/tools/erlang/cuter/default.nix new file mode 100644 index 000000000000..a8806127d356 --- /dev/null +++ b/pkgs/development/tools/erlang/cuter/default.nix @@ -0,0 +1,43 @@ +{stdenv, autoconf, which, writeText, makeWrapper, fetchFromGitHub, erlang, + erlangPackages, z3, python27 }: + +stdenv.mkDerivation rec { + name = "cuter"; + 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/" + ''; + buildInputs = with erlangPackages; [ autoconf 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e86b3b5894e..76128a9c2cc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5355,6 +5355,7 @@ let fetchHex = callPackage ../development/tools/build-managers/rebar3/fetch-hex.nix { }; erlangPackages = callPackage ../development/erlang-modules { }; + cuter = erlangPackages.callPackage ../development/tools/erlang/cuter { }; hex2nix = erlangPackages.callPackage ../development/tools/erlang/hex2nix { }; elixir = callPackage ../development/interpreters/elixir { };