1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 erlang,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "rebar";
10 version = "2.6.4";
11
12 src = fetchFromGitHub {
13 owner = "rebar";
14 repo = "rebar";
15 rev = version;
16 sha256 = "sha256-okvG7X2uHtZ1p+HUoFOmslrWvYjk0QWBAvAMAW2E40c=";
17 };
18
19 buildInputs = [ erlang ];
20
21 buildPhase = "escript bootstrap";
22 installPhase = ''
23 mkdir -p $out/bin
24 cp rebar $out/bin/rebar
25 '';
26
27 meta = {
28 homepage = "https://github.com/rebar/rebar";
29 description = "Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases";
30 mainProgram = "rebar";
31
32 longDescription = ''
33 rebar is a self-contained Erlang script, so it's easy to
34 distribute or even embed directly in a project. Where possible,
35 rebar uses standard Erlang/OTP conventions for project
36 structures, thus minimizing the amount of build configuration
37 work. rebar also provides dependency management, enabling
38 application writers to easily re-use common libraries from a
39 variety of locations (git, hg, etc).
40 '';
41
42 platforms = lib.platforms.unix;
43 license = lib.licenses.asl20;
44 teams = [ lib.teams.beam ];
45 };
46}