lfe: 1.1.1 -> 1.2.1

- Use buildRebar3 instead of mkDerivation, obviating the need for setup-hook.sh
- Manually build proper and patch rebar.config s.t. it doesn't try to fetch it
- Set checkTarget = "travis" and actually run the tests
This commit is contained in:
Eric Bailey 2016-11-23 16:03:23 -06:00 committed by Tuomas Tynkkynen
parent ab9688a63a
commit 6a86b603f9
3 changed files with 37 additions and 15 deletions

View File

@ -1,19 +1,33 @@
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash }:
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, beamPackages }:
stdenv.mkDerivation rec {
name = "lfe-${version}";
version = "1.1.1";
let
inherit (beamPackages) buildRebar3 buildHex;
proper = buildHex rec {
name = "proper";
version = "1.1.1-beta";
sha256 = "0hnkhs761yjynw9382w8wm4j3x0r7lllzavaq2kh9n7qy3zc1rdx";
configurePhase = ''
${erlang}/bin/escript write_compile_flags include/compile_flags.hrl
'';
};
in
buildRebar3 rec {
name = "lfe";
version = "1.2.1";
src = fetchFromGitHub {
owner = "rvirding";
repo = "lfe";
repo = name;
rev = version;
sha256 = "0w1vpjqj8ni43gi84i0mcml4gfaqhmmd9s46di37cngpdw86i3bz";
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
};
buildInputs = [ erlang makeWrapper ];
setupHook = ./setup-hook.sh;
buildInputs = [ makeWrapper ];
beamDeps = [ proper ];
patches = [ ./no-test-deps.patch ];
doCheck = true;
checkTarget = "travis";
# These installPhase tricks are based on Elixir's Makefile.
# TODO: Make, upload, and apply a patch.
@ -24,7 +38,7 @@ stdenv.mkDerivation rec {
rm -Rf $ebindir
install -m755 -d $ebindir
install -m644 ebin/* $ebindir
install -m644 _build/default/lib/lfe/ebin/* $ebindir
install -m755 -d $bindir
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done

View File

@ -0,0 +1,13 @@
diff --git a/rebar.config b/rebar.config
index 1d5a68e..ca33be7 100644
--- a/rebar.config
+++ b/rebar.config
@@ -2,7 +2,7 @@
{erl_opts, [debug_info]}.
-{profiles, [{test, [{deps, [proper]}]}]}.
+%% {profiles, [{test, [{deps, [proper]}]}]}.
{pre_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", ct,
"bin/lfe bin/lfec"

View File

@ -1,5 +0,0 @@
addLfeLibPath() {
addToSearchPath ERL_LIBS $1/lib/lfe/lib
}
envHooks+=(addLfeLibPath)