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

authored by

Eric Bailey and committed by
Tuomas Tynkkynen
6a86b603 ab9688a6

+37 -15
+24 -10
pkgs/development/interpreters/lfe/default.nix
··· 1 - { stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash }: 1 + { stdenv, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, beamPackages }: 2 2 3 - stdenv.mkDerivation rec { 4 - name = "lfe-${version}"; 5 - version = "1.1.1"; 3 + let 4 + inherit (beamPackages) buildRebar3 buildHex; 5 + proper = buildHex rec { 6 + name = "proper"; 7 + version = "1.1.1-beta"; 8 + sha256 = "0hnkhs761yjynw9382w8wm4j3x0r7lllzavaq2kh9n7qy3zc1rdx"; 9 + 10 + configurePhase = '' 11 + ${erlang}/bin/escript write_compile_flags include/compile_flags.hrl 12 + ''; 13 + }; 14 + in 15 + buildRebar3 rec { 16 + name = "lfe"; 17 + version = "1.2.1"; 6 18 7 19 src = fetchFromGitHub { 8 20 owner = "rvirding"; 9 - repo = "lfe"; 21 + repo = name; 10 22 rev = version; 11 - sha256 = "0w1vpjqj8ni43gi84i0mcml4gfaqhmmd9s46di37cngpdw86i3bz"; 23 + sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz"; 12 24 }; 13 25 14 - buildInputs = [ erlang makeWrapper ]; 15 - 16 - setupHook = ./setup-hook.sh; 26 + buildInputs = [ makeWrapper ]; 27 + beamDeps = [ proper ]; 28 + patches = [ ./no-test-deps.patch ]; 29 + doCheck = true; 30 + checkTarget = "travis"; 17 31 18 32 # These installPhase tricks are based on Elixir's Makefile. 19 33 # TODO: Make, upload, and apply a patch. ··· 24 38 25 39 rm -Rf $ebindir 26 40 install -m755 -d $ebindir 27 - install -m644 ebin/* $ebindir 41 + install -m644 _build/default/lib/lfe/ebin/* $ebindir 28 42 29 43 install -m755 -d $bindir 30 44 for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
+13
pkgs/development/interpreters/lfe/no-test-deps.patch
··· 1 + diff --git a/rebar.config b/rebar.config 2 + index 1d5a68e..ca33be7 100644 3 + --- a/rebar.config 4 + +++ b/rebar.config 5 + @@ -2,7 +2,7 @@ 6 + 7 + {erl_opts, [debug_info]}. 8 + 9 + -{profiles, [{test, [{deps, [proper]}]}]}. 10 + +%% {profiles, [{test, [{deps, [proper]}]}]}. 11 + 12 + {pre_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", ct, 13 + "bin/lfe bin/lfec"
-5
pkgs/development/interpreters/lfe/setup-hook.sh
··· 1 - addLfeLibPath() { 2 - addToSearchPath ERL_LIBS $1/lib/lfe/lib 3 - } 4 - 5 - envHooks+=(addLfeLibPath)