From bf2e7265e3fd397c85f6858d873844e59048ae68 Mon Sep 17 00:00:00 2001 From: Shane Sveller Date: Mon, 19 Jun 2023 08:47:00 -0500 Subject: [PATCH] elixir: Locate generate_app.escript via defaulted argument --- pkgs/development/interpreters/elixir/1.15.nix | 1 + pkgs/development/interpreters/elixir/generic-builder.nix | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/elixir/1.15.nix b/pkgs/development/interpreters/elixir/1.15.nix index 0285616f7ea3..6dada168cc37 100644 --- a/pkgs/development/interpreters/elixir/1.15.nix +++ b/pkgs/development/interpreters/elixir/1.15.nix @@ -4,4 +4,5 @@ mkDerivation { sha256 = "sha256-o5MfA0UG8vpnPCH1EYspzcN62yKZQcz5uVUY47hOL9w="; # https://hexdocs.pm/elixir/1.15.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp minimumOTPVersion = "24"; + escriptPath = "lib/elixir/scripts/generate_app.escript"; } diff --git a/pkgs/development/interpreters/elixir/generic-builder.nix b/pkgs/development/interpreters/elixir/generic-builder.nix index 5f08386c9f51..af6982156103 100644 --- a/pkgs/development/interpreters/elixir/generic-builder.nix +++ b/pkgs/development/interpreters/elixir/generic-builder.nix @@ -16,6 +16,7 @@ , sha256 ? null , rev ? "v${version}" , src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; } +, escriptPath ? "lib/elixir/generate_app.escript" } @ args: let @@ -38,7 +39,7 @@ stdenv.mkDerivation ({ buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info"; preBuild = '' - patchShebangs lib/elixir/generate_app.escript || true + patchShebangs ${escriptPath} || true substituteInPlace Makefile \ --replace "/usr/local" $out