elixir: Locate generate_app.escript via defaulted argument

This commit is contained in:
Shane Sveller 2023-06-19 08:47:00 -05:00 committed by Yt
parent ba36bdc1ea
commit bf2e7265e3
2 changed files with 3 additions and 1 deletions

View file

@ -4,4 +4,5 @@ mkDerivation {
sha256 = "sha256-o5MfA0UG8vpnPCH1EYspzcN62yKZQcz5uVUY47hOL9w="; sha256 = "sha256-o5MfA0UG8vpnPCH1EYspzcN62yKZQcz5uVUY47hOL9w=";
# https://hexdocs.pm/elixir/1.15.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp # https://hexdocs.pm/elixir/1.15.0/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
minimumOTPVersion = "24"; minimumOTPVersion = "24";
escriptPath = "lib/elixir/scripts/generate_app.escript";
} }

View file

@ -16,6 +16,7 @@
, sha256 ? null , sha256 ? null
, rev ? "v${version}" , rev ? "v${version}"
, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; } , src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; }
, escriptPath ? "lib/elixir/generate_app.escript"
} @ args: } @ args:
let let
@ -38,7 +39,7 @@ stdenv.mkDerivation ({
buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info"; buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
preBuild = '' preBuild = ''
patchShebangs lib/elixir/generate_app.escript || true patchShebangs ${escriptPath} || true
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "/usr/local" $out --replace "/usr/local" $out