Wrap Erlang scripts to provide missing 'sed' and 'awk'.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>
This commit is contained in:
Moritz Ulrich 2013-08-26 02:43:12 +02:00
parent 946f219a32
commit 45e975abff
3 changed files with 25 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, perl, gnum4, ncurses, openssl }:
{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
, makeWrapper, gnused, gawk }:
let version = "14B04"; in
@ -10,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "0vlvjlg8vzcy6inb4vj00bnj0aarvpchzxwhmi492nv31s8kb6q9";
};
buildInputs = [ perl gnum4 ncurses openssl ];
buildInputs = [ perl gnum4 ncurses openssl makeWrapper ];
patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
@ -21,6 +22,12 @@ stdenv.mkDerivation {
configureFlags = "--with-ssl=${openssl}";
# Some erlang bin/ scripts run sed and awk
postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${gnused}/bin/:${gawk}/bin"
'';
meta = {
homepage = "http://www.erlang.org/";
description = "Programming language used for massively scalable soft real-time systems";

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
, makeWrapper, gnused, gawk
, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
@ -15,6 +16,7 @@ stdenv.mkDerivation {
buildInputs =
[ perl gnum4 ncurses openssl
makeWrapper
] ++ stdenv.lib.optional wxSupport [ mesa wxGTK xlibs.libX11 ];
patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
@ -26,6 +28,12 @@ stdenv.mkDerivation {
configureFlags = "--with-ssl=${openssl}";
# Some erlang bin/ scripts run sed and awk
postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${gnused}/bin/:${gawk}/bin"
'';
meta = {
homepage = "http://www.erlang.org/";
description = "Programming language used for massively scalable soft real-time systems";

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
, gnused, gawk, makeWrapper
, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
@ -14,7 +15,7 @@ stdenv.mkDerivation {
};
buildInputs =
[ perl gnum4 ncurses openssl
[ perl gnum4 ncurses openssl makeWrapper
] ++ stdenv.lib.optional wxSupport [ mesa wxGTK xlibs.libX11 ];
patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
@ -26,6 +27,12 @@ stdenv.mkDerivation {
configureFlags = "--with-ssl=${openssl}";
# Some erlang bin/ scripts run sed and awk
postFixup = ''
wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${gnused}/bin/:${gawk}/bin"
'';
meta = {
homepage = "http://www.erlang.org/";
description = "Programming language used for massively scalable soft real-time systems";