From 45e975abff596d87e0d58fe919e48eac17982bad Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Mon, 26 Aug 2013 02:43:12 +0200 Subject: [PATCH] Wrap Erlang scripts to provide missing 'sed' and 'awk'. Signed-off-by: Moritz Ulrich --- pkgs/development/interpreters/erlang/R14B04.nix | 11 +++++++++-- pkgs/development/interpreters/erlang/R15B03.nix | 8 ++++++++ pkgs/development/interpreters/erlang/R16B01.nix | 9 ++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/erlang/R14B04.nix b/pkgs/development/interpreters/erlang/R14B04.nix index 1d5c9ae3d395..4dd32cd806c3 100644 --- a/pkgs/development/interpreters/erlang/R14B04.nix +++ b/pkgs/development/interpreters/erlang/R14B04.nix @@ -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"; diff --git a/pkgs/development/interpreters/erlang/R15B03.nix b/pkgs/development/interpreters/erlang/R15B03.nix index d282e45dc622..e0760db9f58b 100644 --- a/pkgs/development/interpreters/erlang/R15B03.nix +++ b/pkgs/development/interpreters/erlang/R15B03.nix @@ -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"; diff --git a/pkgs/development/interpreters/erlang/R16B01.nix b/pkgs/development/interpreters/erlang/R16B01.nix index 902af75d4949..168db4484b10 100644 --- a/pkgs/development/interpreters/erlang/R16B01.nix +++ b/pkgs/development/interpreters/erlang/R16B01.nix @@ -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";