2014-11-18 01:25:15 +01:00
|
|
|
{ stdenv, fetchgit, which, perl, jdk
|
|
|
|
, ocamlPackages, openssl
|
|
|
|
, coreutils, zlib, ncurses, makeWrapper
|
|
|
|
, gcc, binutils, gnumake, nodejs} :
|
2011-11-28 00:58:46 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opa";
|
2014-11-18 01:25:15 +01:00
|
|
|
version = "4309";
|
2011-11-28 00:58:46 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2014-11-18 01:25:15 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = https://github.com/MLstate/opalang.git;
|
|
|
|
rev = "047f58bfd4be35ee30176156b3718c707a6c0f76";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "1laynwf64713q2vhdkxw679dah6hl3bvmrj8cj836a9k9z7jcc1r";
|
2011-11-28 00:58:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Paths so the opa compiler code generation will use the same programs as were
|
|
|
|
# used to build opa.
|
2014-11-18 01:25:15 +01:00
|
|
|
codeGeneratorPaths = "${ocamlPackages.ocaml}/bin:${gcc}/bin:${binutils}/bin:${gnumake}/bin:${nodejs}/bin";
|
2011-11-28 00:58:46 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2015-01-08 10:26:49 +01:00
|
|
|
patchShebangs .
|
2014-08-12 14:22:19 +02:00
|
|
|
(
|
|
|
|
cat ./compiler/buildinfos/buildInfos.ml.pre
|
|
|
|
./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt
|
|
|
|
echo let opa_git_version = ${version}
|
|
|
|
echo 'let opa_git_sha = "xxxx"'
|
|
|
|
cat ./compiler/buildinfos/buildInfos.ml.post
|
|
|
|
)> ./compiler/buildinfos/buildInfos.ml
|
2011-11-28 00:58:46 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-18 01:25:15 +01:00
|
|
|
prefixKey = "-prefix ";
|
|
|
|
|
|
|
|
configureFlags = "-ocamlfind ${ocamlPackages.findlib}/bin/ocamlfind ";
|
2011-11-28 00:58:46 +01:00
|
|
|
|
2014-11-18 01:25:15 +01:00
|
|
|
buildInputs = [ which perl jdk openssl coreutils zlib ncurses
|
|
|
|
makeWrapper gcc binutils gnumake nodejs
|
|
|
|
] ++ (with ocamlPackages; [
|
|
|
|
ocaml findlib ocaml_ssl cryptokit camlzip ulex ocamlgraph
|
|
|
|
]);
|
2011-11-28 00:58:46 +01:00
|
|
|
|
2014-11-18 01:25:15 +01:00
|
|
|
NIX_LDFLAGS = "-lgcc_s";
|
2011-11-28 00:58:46 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Have compiler use same tools for code generation as used to build it.
|
|
|
|
for p in $out/bin/opa ; do
|
|
|
|
wrapProgram $p --prefix PATH ":" "${codeGeneratorPaths}" ;
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install emacs mode.
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/emacs/site-lisp/opa
|
2014-11-18 01:25:15 +01:00
|
|
|
install -m 0644 -v ./tools/editors/emacs/{opa-mode.el,site-start.el} $out/share/emacs/site-lisp/opa
|
2011-11-28 00:58:46 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-01-17 22:34:08 +01:00
|
|
|
description = "A concise and elegant language for writing distributed web applications";
|
2011-11-28 00:58:46 +01:00
|
|
|
longDescription = ''
|
2013-01-17 22:34:08 +01:00
|
|
|
Opa is a new generation of web development platform that lets you write distributed
|
|
|
|
web applications using a single technology. Among the the many features of Opa are these:
|
|
|
|
Opa is concise, simple, concurrent, dynamically distributed, and secure.
|
2011-11-28 00:58:46 +01:00
|
|
|
'';
|
|
|
|
homepage = http://opalang.org/;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
2014-11-18 01:25:15 +01:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2011-11-28 00:58:46 +01:00
|
|
|
};
|
|
|
|
}
|