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:
parent
ab9688a63a
commit
6a86b603f9
|
@ -1,19 +1,33 @@
|
||||||
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash }:
|
{ stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, beamPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "lfe-${version}";
|
inherit (beamPackages) buildRebar3 buildHex;
|
||||||
version = "1.1.1";
|
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 {
|
src = fetchFromGitHub {
|
||||||
owner = "rvirding";
|
owner = "rvirding";
|
||||||
repo = "lfe";
|
repo = name;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0w1vpjqj8ni43gi84i0mcml4gfaqhmmd9s46di37cngpdw86i3bz";
|
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ erlang makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
|
beamDeps = [ proper ];
|
||||||
setupHook = ./setup-hook.sh;
|
patches = [ ./no-test-deps.patch ];
|
||||||
|
doCheck = true;
|
||||||
|
checkTarget = "travis";
|
||||||
|
|
||||||
# These installPhase tricks are based on Elixir's Makefile.
|
# These installPhase tricks are based on Elixir's Makefile.
|
||||||
# TODO: Make, upload, and apply a patch.
|
# TODO: Make, upload, and apply a patch.
|
||||||
|
@ -24,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
rm -Rf $ebindir
|
rm -Rf $ebindir
|
||||||
install -m755 -d $ebindir
|
install -m755 -d $ebindir
|
||||||
install -m644 ebin/* $ebindir
|
install -m644 _build/default/lib/lfe/ebin/* $ebindir
|
||||||
|
|
||||||
install -m755 -d $bindir
|
install -m755 -d $bindir
|
||||||
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
|
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
|
||||||
|
|
|
@ -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"
|
|
@ -1,5 +0,0 @@
|
||||||
addLfeLibPath() {
|
|
||||||
addToSearchPath ERL_LIBS $1/lib/lfe/lib
|
|
||||||
}
|
|
||||||
|
|
||||||
envHooks+=(addLfeLibPath)
|
|
Loading…
Reference in New Issue