1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 00:22:13 +00:00
Commit graph

16 commits

Author SHA1 Message Date
Eric Merritt d541d0e640 erlang support: seperate hex and rebar3 support
Building Hex packages is a superset of building with rebar3. There is no
need to force folks that use rebar3 but not hex to build with hex. This
commit seperates the rebar3 specific bits and the hex specific bits into
seperate functions that can be used independently.
2016-01-14 14:37:35 -08:00
Eric Merritt 474e417891 erlang support: allow nix-shell to work correctly
This changes build-hex.nix so that the buildHex and related functions
work correctly in a nix-shell.
2016-01-14 14:36:47 -08:00
Gleb Peregud d7e17c2e71 Add shell env to buildHex packages.
This adds erlangPackages.${name}.env, which is usable to launch a shell
with the package and it's dependencies like this:

    nix-shell -A erlangPackages.lager.env

This required:

1) refactoring buildHex to become a fixed-point function,
2) moves output of a package into $out/${name},
3) introduces erlEnv (buildEnv, which links in package and it's deps
   into one directory - a super-simple plagiarization of
   haskellPackages.compiler.ghcWithPackages) and
4) shell function producing a un-buildable derivation to be used by
   nix-shell
2015-12-19 00:07:54 +01:00
Gleb Peregud 4ba1a51b7f Move registry to rebar3, since it needs it itself to be bootstrapped.
This makes rebar3 build a bit more hermetic. Next stage is to pull in
rebar3 plugins dependencies for bootstrap to pick up.
2015-12-15 14:05:19 +01:00
Gleb Peregud 033902d269 Refactor fetchHex out of buildHex.
This will allow to reuse this code to fetch rebar3's dependencies to
ensure it's hermetic build.
2015-12-15 14:01:38 +01:00
Gleb Peregud acaf2c179e Allow specifying meta for buildHex and buildErlang.
Adds "meta" for meck package as a test.
2015-12-15 14:01:38 +01:00
Gleb Peregud 2a7e77cac5 Move registrySnapshot into it's own file for easier automation. 2015-12-15 14:01:37 +01:00
Gleb Peregud 7e57b20abc Add rebar3-pc to plugin deps automatically if compilePorts is enabled 2015-12-15 14:01:37 +01:00
Gleb Peregud 13a1ab440c Replace deprecated uniqList with unique function 2015-12-15 14:01:37 +01:00
Gleb Peregud 5d3680d265 Fetch hex.pm registry snapshot with external github repo.
This allows to avoid fetching registry file from S3 at build time,
making the build hermetic and much faster. Automatic tools will be used
to update said external repo content when Hex packages are
imported/update.
2015-12-15 14:01:37 +01:00
Gleb Peregud 3a9110b15c Add support for rebar3 plugins to buildHex.
Allow specifying pluginDeps for buildHex listing rebar3 plugins which
are required for given package to be built by rebar3.
2015-12-15 14:01:37 +01:00
Gleb Peregud eac25eaf69 Simplify patch and move pc compile call into buildPhase 2015-12-15 14:01:37 +01:00
Gleb Peregud 406b974420 Add "compilePorts" enabling rebar3 "pc" plugin
If compilePorts is enabled plugin "pc" is added to the rebar.config
during postPatch. This makes rebar3 compile download the plugin, hence
added TODO.
2015-12-15 14:01:36 +01:00
Gleb Peregud 2251a942fc Add support for Hex package name
There are some packages on Hex which have custom hex-specific names, but
inside there's a base project name.

Remove most packages andadd ibrowse, meck, jiffy
2015-12-15 14:01:36 +01:00
Gleb Peregud 6dcbe059e1 Automagically download files from hex.pm tarball S3 repo 2015-12-15 14:01:36 +01:00
Gleb Peregud a05e2dbe65 Add few erlang modules 2015-12-15 14:01:21 +01:00