move rebar3-nix-bootstrap to rebar3

This moves rebar3-nix-bootstrap from its own repository to rebar3. Its a
single file and this vastly reduces the complexity of making changes.
This commit is contained in:
Eric Merritt
2016-04-23 19:03:29 -07:00
parent 2d6d9682bb
commit 383626b9d7
5 changed files with 264 additions and 29 deletions
@@ -1,10 +1,12 @@
{ stdenv, writeText, callPackage, fetchurl,
fetchHex, erlang, hermeticRebar3 ? true, rebar3-nix-bootstrap,
fetchHex, erlang, hermeticRebar3 ? true,
tree, fetchFromGitHub, hexRegistrySnapshot }:
let
version = "3.0.0-beta.4";
bootstrapper = ./rebar3-nix-bootstrap;
# TODO: all these below probably should go into nixpkgs.erlangModules.sources.*
# {erlware_commons, "0.16.0"},
erlware_commons = fetchHex {
@@ -83,16 +85,18 @@ stdenv.mkDerivation {
sha256 = "0px66scjdia9aaa5z36qzxb848r56m0k98g0bxw065a2narsh4xy";
};
inherit bootstrapper;
patches = if hermeticRebar3 == true
then [ ./hermetic-bootstrap.patch ./hermetic-rebar3.patch ]
else [];
buildInputs = [ erlang tree ];
propagatedBuildInputs = [ hexRegistrySnapshot rebar3-nix-bootstrap ];
propagatedBuildInputs = [ hexRegistrySnapshot ];
postPatch = ''
echo postPatch
rebar3-nix-bootstrap registry-only
${erlang}/bin/escript ${bootstrapper} registry-only
echo "$ERL_LIBS"
mkdir -p _build/default/lib/
mkdir -p _build/default/plugins