On Sun, Jan 03, 2016 at 07:56:07PM -0800, Steve Sprang wrote: > Add the Erlang programming language. > > Is there a better way to substitute "/usr/bin/env" with (which "env")? > There are a number of files throughout the source tree that require > the substitution, but there's not a handy way to identify many of them > without explicitly listing them. > > -Steve
> From d31d3b2ece298b3e7610890390a7a12f865be881 Mon Sep 17 00:00:00 2001 > From: Steve Sprang <s...@stevesprang.com> > Date: Sun, 3 Jan 2016 19:46:40 -0800 > Subject: [PATCH] gnu: Add erlang. > > * gnu/packages/erlang.scm: New file. > * gnu-system.am (GNU_SYSTEM_MODULES): Add it. > --- > gnu-system.am | 1 + > gnu/packages/erlang.scm | 82 > +++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 83 insertions(+) > create mode 100644 gnu/packages/erlang.scm > > diff --git a/gnu-system.am b/gnu-system.am > index c0f8fac..19d0ec5 100644 > --- a/gnu-system.am > +++ b/gnu-system.am > @@ -99,6 +99,7 @@ GNU_SYSTEM_MODULES = \ [...] > + (native-inputs > + `(("perl" ,perl) > + ("autoconf" ,autoconf))) The tarball available on erlang.org is already bootstrapped. If we use that one, we don't need to explicitly include autoconf and we don't need the 'prep-configure phase. This seems to be the correct URL for downloading the current and past releases (there is no "archive" directory linked anywhere that I saw): http://www.erlang.org/download/otp_src_18.2.1.tar.gz > + (inputs > + `(("ncurses" ,ncurses) > + ("openssl" ,openssl))) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-after > + 'patch-source-shebangs 'patch-source-env > + (lambda* _ > + (let ((escripts > + (append > + (find-files "." "\\.escript") > + (find-files "lib/stdlib/test/escript_SUITE_data/") > + '("erts/lib_src/utils/make_atomics_api" > + "erts/preloaded/src/add_abstract_code" > + "lib/diameter/bin/diameterc" > + "lib/reltool/examples/display_args" > + "lib/reltool/examples/mnesia_core_dump_viewer" > + "lib/snmp/src/compile/snmpc.src" > + "make/verify_runtime_dependencies" > + "make/emd2exml.in")))) > + (substitute* escripts > + (("/usr/bin/env") (which "env")))))) > + (add-before > + 'configure 'prep-configure > + (lambda* _ > + (setenv "ERL_TOP" (getcwd)) > + (zero? (system* "./otp_build" "autoconf"))))) > + #:test-target "release_tests")) > + (home-page "http://erlang.org/") > + (synopsis "The Erlang programming language") > + (description > + "Erlang is a programming language used to build massively > +scalable soft real-time systems with requirements on high > +availability. Some of its uses are in telecoms, banking, e-commerce, > +computer telephony and instant messaging. Erlang's runtime system has > +built-in support for concurrency, distribution and fault tolerance.") > + (license license:asl2.0))) > -- > 2.6.3 >