Unverified Commit b044ad6e authored by Adam C. Stephens's avatar Adam C. Stephens
Browse files

elixir: simplifiy generic builder and overriding

parent 45998634
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -51,27 +51,27 @@ let
      # BEAM-based languages.
      elixir = elixir_1_18;

      elixir_1_19 = lib'.callElixir ../interpreters/elixir/1.19.nix {
      elixir_1_19 = callPackage ../interpreters/elixir/1.19.nix {
        inherit erlang;
        debugInfo = true;
      };

      elixir_1_18 = lib'.callElixir ../interpreters/elixir/1.18.nix {
      elixir_1_18 = callPackage ../interpreters/elixir/1.18.nix {
        inherit erlang;
        debugInfo = true;
      };

      elixir_1_17 = lib'.callElixir ../interpreters/elixir/1.17.nix {
      elixir_1_17 = callPackage ../interpreters/elixir/1.17.nix {
        inherit erlang;
        debugInfo = true;
      };

      elixir_1_16 = lib'.callElixir ../interpreters/elixir/1.16.nix {
      elixir_1_16 = callPackage ../interpreters/elixir/1.16.nix {
        inherit erlang;
        debugInfo = true;
      };

      elixir_1_15 = lib'.callElixir ../interpreters/elixir/1.15.nix {
      elixir_1_15 = callPackage ../interpreters/elixir/1.15.nix {
        inherit erlang;
        debugInfo = true;
      };
+0 −44
Original line number Diff line number Diff line
@@ -38,48 +38,4 @@ rec {
        versionArgs: import ../../development/interpreters/erlang/generic-builder.nix (versionArgs // args);
    in
    pkgs.callPackage (import drv genericBuilder) { };

  /*
    Uses generic-builder to evaluate provided drv containing Elixir version
    specific data.

    drv: file containing version-specific args;
    genericBuilder: generic builder for all Erlang versions;
    args: arguments merged into version-specific args, used mostly to customize
          high level options;

    Arguments passed to the generic-builder are overridable.
  */
  callElixir =
    drv: args:
    let
      builder = callPackage ../interpreters/elixir/generic-builder.nix args;
    in
    callPackage drv {
      mkDerivation = pkgs.makeOverridable builder;
    };

  /*
    Uses generic-builder to evaluate provided drv containing Elixir version
    specific data.

    drv: package containing version-specific args;
    builder: generic builder for all Erlang versions;
    args: arguments merged into version-specific args, used mostly to customize
          dependencies;

    Arguments passed to the generic-builder are overridable.

    Please note that "mkDerivation" defined here is the one called from 1.2.nix
    and similar files.
  */
  callLFE =
    drv: args:
    let
      builder = callPackage ../interpreters/lfe/generic-builder.nix args;
    in
    callPackage drv {
      mkDerivation = pkgs.makeOverridable builder;
    };

}
+2 −4
Original line number Diff line number Diff line
{ mkDerivation }:
mkDerivation {
import ./generic-builder.nix {
  version = "1.15.7";
  sha256 = "sha256-6GfZycylh+sHIuiQk/GQr1pRQRY1uBycSQdsVJ0J13k=";
  hash = "sha256-6GfZycylh+sHIuiQk/GQr1pRQRY1uBycSQdsVJ0J13k=";
  # https://hexdocs.pm/elixir/1.15.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
  minimumOTPVersion = "24";
  maximumOTPVersion = "26";
  escriptPath = "lib/elixir/scripts/generate_app.escript";
}
+2 −4
Original line number Diff line number Diff line
{ mkDerivation }:
mkDerivation {
import ./generic-builder.nix {
  version = "1.16.3";
  sha256 = "sha256-WUBqoz3aQvBlSG3pTxGBpWySY7I0NUcDajQBgq5xYTU=";
  hash = "sha256-WUBqoz3aQvBlSG3pTxGBpWySY7I0NUcDajQBgq5xYTU=";
  # https://hexdocs.pm/elixir/1.16.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
  minimumOTPVersion = "24";
  maximumOTPVersion = "26";
  escriptPath = "lib/elixir/scripts/generate_app.escript";
}
+2 −4
Original line number Diff line number Diff line
{ mkDerivation }:
mkDerivation {
import ./generic-builder.nix {
  version = "1.17.3";
  sha256 = "sha256-7Qo6y0KAQ9lwD4oH+7wQ4W5i6INHIBDN9IQAAsYzNJw=";
  hash = "sha256-7Qo6y0KAQ9lwD4oH+7wQ4W5i6INHIBDN9IQAAsYzNJw=";
  # https://hexdocs.pm/elixir/1.17.3/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
  minimumOTPVersion = "25";
  maximumOTPVersion = "27";
  escriptPath = "lib/elixir/scripts/generate_app.escript";
}
Loading