mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
d1b9c9d2cd
This change introduces a fixpoint, which allows to do deep override when building packages defined in pkgs/development/beam-modules/default.hex. This allows to provide beam.packages.erlang{,R16,R17,R18,R19} which contains the same packages built with different Erlang/OTP versions. Top-level attribute beamPackages points at beam.packages.erlangR18, the same applies to other top-level Erlang packages. TODO: - beam.packages.erlang{R16,R17} is almost useless, since rebar/rebar3 does not build using these versions; - all packages in beam.packages which use buildMix are actually built with erlangR18; - update documentation.
21 lines
285 B
Nix
21 lines
285 B
Nix
{ stdenv, buildRebar3, fetchHex }:
|
|
|
|
{ name, version, sha256
|
|
, builder ? buildRebar3
|
|
, hexPkg ? name
|
|
, ... }@attrs:
|
|
|
|
with stdenv.lib;
|
|
|
|
let
|
|
pkg = self: builder (attrs // {
|
|
|
|
src = fetchHex {
|
|
pkg = hexPkg;
|
|
inherit version;
|
|
inherit sha256;
|
|
};
|
|
});
|
|
in
|
|
fix pkg
|