@@ -1,17 +1,19 @@
1−{ stdenv, fetchgit, which, perl, jdk
1+{ stdenv, fetchFromGitHub, which, perl, jdk
22, ocamlPackages, openssl
33, coreutils, zlib, ncurses, makeWrapper
4−, gcc, binutils, gnumake, nodejs} :
4+, gcc, binutils, gnumake, nodejs
5+}:
56
67stdenv.mkDerivation rec {
78 pname = "opa";
8− version = "4309";
9+ version = "4310";
910 name = "${pname}-${version}";
1011
11− src = fetchgit {
12− url = https://github.com/MLstate/opalang.git;
13− rev = "047f58bfd4be35ee30176156b3718c707a6c0f76";
14− sha256 = "1laynwf64713q2vhdkxw679dah6hl3bvmrj8cj836a9k9z7jcc1r";
12+ src = fetchFromGitHub {
13+ owner = "MLstate";
14+ repo = "opalang";
15+ rev = "a13d45af30bc955c40c4b320353fb21e4ecacbc5";
16+ sha256 = "1qs91rq9xrafv2mf2v415k8lv91ab3ycz0xkpjh1mng5ca3pjlf3";
1517 };
1618
1719 # Paths so the opa compiler code generation will use the same programs as were
@@ -27,6 +29,12 @@ stdenv.mkDerivation rec {
2729 echo 'let opa_git_sha = "xxxx"'
2830 cat ./compiler/buildinfos/buildInfos.ml.post
2931 )> ./compiler/buildinfos/buildInfos.ml
32+ for p in configure tools/platform_helper.sh
33+ do
34+ substituteInPlace $p --replace 'IS_MAC=1' 'IS_LINUX=1'
35+ done
36+ export CAMLP4O=${ocamlPackages.camlp4}/bin/camlp4o
37+ export CAMLP4ORF=${ocamlPackages.camlp4}/bin/camlp4orf
3038 '';
3139
3240 prefixKey = "-prefix ";
@@ -36,10 +44,10 @@ stdenv.mkDerivation rec {
3644 buildInputs = [ which perl jdk openssl coreutils zlib ncurses
3745 makeWrapper gcc binutils gnumake nodejs
3846 ] ++ (with ocamlPackages; [
39− ocaml findlib ocaml_ssl cryptokit camlzip ulex ocamlgraph
47+ ocaml findlib ocaml_ssl cryptokit camlzip ulex ocamlgraph camlp4
4048 ]);
4149
42− NIX_LDFLAGS = "-lgcc_s";
50+ NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
4351
4452 postInstall = ''
4553 # Have compiler use same tools for code generation as used to build it.
@@ -62,9 +70,6 @@ stdenv.mkDerivation rec {
6270 homepage = http://opalang.org/;
6371 license = stdenv.lib.licenses.gpl3;
6472 maintainers = [ stdenv.lib.maintainers.kkallio ];
65− platforms = with stdenv.lib.platforms; linux;
66− # opa was built with nodejs 0.10 which reached end of LTS
67− # in October 216, it doesn't built with nodejs 4.x
68− broken = true;
73+ platforms = with stdenv.lib.platforms; unix;
6974 };
7075}